Axiom (v1.2.0)

A lightweight PHP framework
axTableHelper Class Reference

Table Helper Class. More...

+ Inheritance diagram for axTableHelper:

Public Member Functions

 __construct ($caption=false)
 Constructor.
 setColumnNames (array $columns, $filter=true)
 Set the table column's name (and optionaly use them as a filter for any row added to the body)
 setHead ($rows=null)
 Set the header.
 setFoot ($rows=null)
 Set the footer.
 setBody ($rows=null)
 Set the body.
 addRow ($row, $to=false)
 Add a row to the given table row group.
 addRows ($rows, $to=false)
 Add multiple rows at once.
 addColGroup ()
 Add a colgroup to the table and return it.
 __toString ()

Static Public Member Functions

static export ($caption=false)
 Constructor static alias.

Data Fields

 $head = null
 thead element
 $foot = null
 tfoot element
 $body = null
 tbody element

Detailed Description

Table Helper Class.

Author:
Delespierre
License:
http://www.gnu.org/licenses/lgpl.html Lesser General Public Licence version 3

Definition at line 16 of file axTableHelper.class.php.


Constructor & Destructor Documentation

axTableHelper::__construct ( caption = false)

Constructor.

Parameters:
string$caption[optional] [default false] The table caption value

Definition at line 40 of file axTableHelper.class.php.


Member Function Documentation

__toString implementation

Get a string represenation of current node and its children.

Returns:
string

Reimplemented from axBaseHelper.

Definition at line 160 of file axTableHelper.class.php.

Add a colgroup to the table and return it.

Returns:
axColGroupHelper

Definition at line 153 of file axTableHelper.class.php.

axTableHelper::addRow ( row,
to = false 
)

Add a row to the given table row group.

The $to parameter can be either:

  • head or thead
  • foot or tfoot
  • body or tbody If the $to parameter is left to false, the row will be added to the body section.
Parameters:
Traversable$row
string$to[optional] [default false] The section to append this row to
Returns:
axTableHelper

Definition at line 125 of file axTableHelper.class.php.

axTableHelper::addRows ( rows,
to = false 
)

Add multiple rows at once.

See also:
axTableHelper::addRow()
Parameters:
Traversable | array$rows
string$to[optional] [default false] The section to append this row to
Returns:
axTableHelper

Definition at line 142 of file axTableHelper.class.php.

static axTableHelper::export ( caption = false) [static]

Constructor static alias.

Constructor.

Parameters:
string$caption[optional] [default false] The table caption value
Returns:
axTableHelper

Definition at line 194 of file axTableHelper.class.php.

axTableHelper::setBody ( rows = null)

Set the body.

If previous body was set, it will be discarded.

Parameters:
Traversable$rows[optional] [default null] The rows to append
Returns:
axTableHelper

Definition at line 105 of file axTableHelper.class.php.

axTableHelper::setColumnNames ( array $  columns,
filter = true 
)

Set the table column's name (and optionaly use them as a filter for any row added to the body)

See also:
axTableHelper::setHead()
Parameters:
array$columns
boolean$filter[optional] [default true] Use these columns as filter
Returns:
axTableHelper

Definition at line 61 of file axTableHelper.class.php.

axTableHelper::setFoot ( rows = null)

Set the footer.

If previous footer was set, it will be discarded.

Parameters:
Traversable | array$rows[optional] [default null] The rows to append
Returns:
axTableHelper

Definition at line 90 of file axTableHelper.class.php.

axTableHelper::setHead ( rows = null)

Set the header.

If previous header was set, it will be discarded.

Parameters:
Traversable | array$rows[optional] [default null] The rows to append
Returns:
axTableHelper

Definition at line 75 of file axTableHelper.class.php.


Field Documentation

axTableRowGroupHelper axTableHelper::$body = null

tbody element

Definition at line 34 of file axTableHelper.class.php.

axTableRowGroupHelper axTableHelper::$foot = null

tfoot element

Definition at line 28 of file axTableHelper.class.php.

axTableRowGroupHelper axTableHelper::$head = null

thead element

Definition at line 22 of file axTableHelper.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables