CI_Table Class Reference

List of all members.

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 = ""


Member Function Documentation

CI_Table::_compile_template (  ) 

Compile Template

private

Returns:
void

CI_Table::_default_template (  ) 

Default Template

private

Returns:
void

CI_Table::_set_from_array ( data,
set_heading = TRUE 
)

Set table data from an array

public

Parameters:
array 
Returns:
void

CI_Table::_set_from_object ( query  ) 

Set table data from a database result object

public

Parameters:
object 
Returns:
void

CI_Table::add_row (  ) 

Add a table row

Can be passed as an array or discreet params

public

Parameters:
mixed 
Returns:
void

CI_Table::CI_Table (  ) 

CI_Table::clear (  ) 

Clears the table arrays. Useful if multiple tables are being generated

public

Returns:
void

CI_Table::generate ( table_data = NULL  ) 

Generate the table

public

Parameters:
mixed 
Returns:
string

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

Parameters:
array 
int 
Returns:
void

CI_Table::set_caption ( caption  ) 

Add a table caption

public

Parameters:
string 
Returns:
void

CI_Table::set_empty ( value  ) 

Set "empty" cells

Can be passed as an array or discreet params

public

Parameters:
mixed 
Returns:
void

CI_Table::set_heading (  ) 

Set the table heading

Can be passed as an array or discreet params

public

Parameters:
mixed 
Returns:
void

CI_Table::set_template ( template  ) 

Set the template

public

Parameters:
array 
Returns:
void


Member Data Documentation

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


The documentation for this class was generated from the following file:

Generated on Sun Nov 16 16:09:17 2008 for CodeIgniter by  doxygen 1.5.7.1