My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Data Fields
CI_Table Class Reference

Public Member Functions

 set_template ($template)
 
 set_heading ()
 
 make_columns ($array=array(), $col_limit=0)
 
 set_empty ($value)
 
 add_row ()
 
 _prep_args ($args)
 
 set_caption ($caption)
 
 generate ($table_data=NULL)
 
 clear ()
 
 _set_from_object ($query)
 
 _set_from_array ($data, $set_heading=TRUE)
 
 _compile_template ()
 
 _default_template ()
 

Data Fields

 $rows = array()
 
 $heading = array()
 
 $auto_heading = TRUE
 
 $caption = NULL
 
 $template = NULL
 
 $newline = "\n"
 
 $empty_cells = ""
 
 $function = FALSE
 

Member Function Documentation

_compile_template ( )

Compile Template

private

Returns
void
_default_template ( )

Default Template

private

Returns
void
_prep_args (   $args)

Prep Args

Ensures a standard associative array format for all cell data

public

Parameters
type
Returns
type
_set_from_array (   $data,
  $set_heading = TRUE 
)

Set table data from an array

public

Parameters
array
Returns
void
_set_from_object (   $query)

Set table data from a database result object

public

Parameters
object
Returns
void
add_row ( )

Add a table row

Can be passed as an array or discreet params

public

Parameters
mixed
Returns
void
clear ( )

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

public

Returns
void
generate (   $table_data = NULL)

Generate the table

public

Parameters
mixed
Returns
string
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
set_caption (   $caption)

Add a table caption

public

Parameters
string
Returns
void
set_empty (   $value)

Set "empty" cells

Can be passed as an array or discreet params

public

Parameters
mixed
Returns
void
set_heading ( )

Set the table heading

Can be passed as an array or discreet params

public

Parameters
mixed
Returns
void
set_template (   $template)

Set the template

public

Parameters
array
Returns
void

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