Public Member Functions | |
| CI_Table () | |
| set_template ($template) | |
| set_heading () | |
| make_columns ($array=array(), $col_limit=0) | |
| set_empty ($value) | |
| add_row () | |
| set_caption ($caption) | |
| generate ($table_data=NULL) | |
| clear () | |
| _set_from_object ($query) | |
| _set_from_array ($data, $set_heading=TRUE) | |
| _compile_template () | |
| _default_template () | |
Public Attributes | |
| $rows = array() | |
| $heading = array() | |
| $auto_heading = TRUE | |
| $caption = NULL | |
| $template = NULL | |
| $newline = "\n" | |
| $empty_cells = "" | |
| CI_Table::_compile_template | ( | ) |
Compile Template
private
| CI_Table::_default_template | ( | ) |
Default Template
private
| CI_Table::_set_from_array | ( | $ | data, | |
| $ | set_heading = TRUE | |||
| ) |
Set table data from an array
public
| array |
| CI_Table::_set_from_object | ( | $ | query | ) |
Set table data from a database result object
public
| object |
| CI_Table::add_row | ( | ) |
Add a table row
Can be passed as an array or discreet params
public
| mixed |
| CI_Table::CI_Table | ( | ) |
| CI_Table::clear | ( | ) |
Clears the table arrays. Useful if multiple tables are being generated
public
| CI_Table::generate | ( | $ | table_data = NULL |
) |
Generate the table
public
| mixed |
| CI_Table::make_columns | ( | $ | array = array(), |
|
| $ | col_limit = 0 | |||
| ) |
Set columns. Takes a one-dimensional array as input and creates a multi-dimensional array with a depth equal to the number of columns. This allows a single array with many elements to be displayed in a table that has a fixed column count.
public
| array | ||
| int |
| CI_Table::set_caption | ( | $ | caption | ) |
Add a table caption
public
| string |
| CI_Table::set_empty | ( | $ | value | ) |
Set "empty" cells
Can be passed as an array or discreet params
public
| mixed |
| CI_Table::set_heading | ( | ) |
Set the table heading
Can be passed as an array or discreet params
public
| mixed |
| CI_Table::set_template | ( | $ | template | ) |
Set the template
public
| array |
| CI_Table::$auto_heading = TRUE |
| CI_Table::$caption = NULL |
| CI_Table::$empty_cells = "" |
| CI_Table::$heading = array() |
| CI_Table::$newline = "\n" |
| CI_Table::$rows = array() |
| CI_Table::$template = NULL |
1.5.7.1