\Hazaar\Html
Table
The HTML table class.

Displays an HTML <table> element.

Tags

Since

1.1

Summary
Methods Properties Constants
set
No constants
Properties
$tbody
$tbody
$tfoot
$tfoot
$thead
$thead
Methods
__construct()
__construct($rows = null, $parameters = Array ( ) )

The HTML table constructor.

Tags

Since

1.1

Parameters

$rows

No description

$parametersarray

Optional parameters to apply to the anchor.

addFooter()
addFooter($fields)

Add a header to the table. If a header was previously set, it will be overwritten as only a single header is allowed.

Tags

Since

1.2

Parameters

$fieldsarray

An array of fields to add to the row. This can be any element. If an element is a \Hazaar\Html\Th object then it will be added as-is.

addFooters()
addFooters($rows)

Add multiple headers at a time. Takes an array of row arrays.

Tags

Since

1.2

Parameters

$rowsarray

An array of row array data

addHeader()
addHeader($fields)

Add a header to the table. If a header was previously set, it will be overwritten as only a single header is allowed.

Tags

Since

1.2

Parameters

$fieldsarray

An array of fields to add to the row. This can be any element. If an element is a \Hazaar\Html\Th object then it will be added as-is.

addHeaders()
addHeaders($rows)

Add multiple headers at a time. Takes an array of row arrays.

Tags

Since

1.2

Parameters

$rowsarray

An array of row array data

addRow()
addRow($fields)

Add a row to the table.

Tags

Since

1.2

Parameters

$fieldsarray

An array of fields to add to the row. This can be any element. If an element is a \Hazaar\Html\Th object then it will be added as-is.

addRows()
addRows($rows)

Add multiple rows at a time. Takes an array of row arrays.

Tags

Since

1.2

Parameters

$rowsarray

An array of row array data

Inherited
next()
next()
Inherited
offsetExists()
offsetExists($key)

Parameters

$key

No description

Inherited
offsetGet()
offsetGet($key)

Parameters

$key

No description

Inherited
offsetSet()
offsetSet($key, $value)

Parameters

$key

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($key)

Parameters

$key

No description

Inherited
prepend()
prepend($element) : \\Hazaar\\Html\\Block

Prepend an element to the beginning of the contents.

Tags

Since

1.0.0

Parameters

$element

No description

Returns

\\Hazaar\\Html\\Block
Inherited
renderElement()
renderElement($element) : string

Recursively render a child element.

Tags

Since

1.0.0

Parameters

$elementmixed

The element to render. Can be anything that can be converted to a string, or an array of other elements.

Returns

string
Inherited
renderObject()
renderObject() : string

Render the current object as an HTML string.

Tags

Since

1.0.0

Returns

string
Inherited
rewind()
rewind()
Inherited
set()
set() : \\Hazaar\\Html\\Block

Set one or more elements as the contents of the block.

Tags

Since

1.0.0

Inherited
valid()
valid()