Html_Data_Table
Represents a HTML table. This class allows you to build a table by sequentially adding headings, rows, data, etc, and then outputting to either HTML, and array or JSON.
For example, the full HTML for the table can then be obtained by calling the to_html() method. This makes it a much cleaner way of producing the HTML required for a table.
Tags
Table of Contents
- $above : mixed
- $attributes : mixed
- $below : mixed
- $current_row : mixed
- $data : mixed
- $footer : mixed
- $header : mixed
- __construct() : mixed
- add_above() : mixed
- add_attribute() : mixed
- add_below() : mixed
- add_data() : mixed
- add_footer() : mixed
- add_header() : mixed
- get_data() : mixed
- new_row() : mixed
- reset() : mixed
- reset_data() : mixed
- set_data() : mixed
- to_array() : mixed
- to_html() : mixed
- to_json() : mixed
Properties
$above
private
mixed
$above
= []
$attributes
private
mixed
$attributes
= []
$below
private
mixed
$below
= []
$current_row
private
mixed
$current_row
$data
private
mixed
$data
= []
$footer
private
mixed
$footer
$header
private
mixed
$header
Methods
__construct()
public
__construct() : mixed
Return values
mixed —add_above()
public
add_above(mixed $above) : mixed
Parameters
- $above : mixed
Tags
Return values
mixed —add_attribute()
public
add_attribute(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
Return values
mixed —add_below()
public
add_below(mixed $below) : mixed
Parameters
- $below : mixed
Tags
Return values
mixed —add_data()
public
add_data(mixed $data[, mixed $attributes = false ][, mixed $key = false ]) : mixed
Parameters
- $data : mixed
- $attributes : mixed = false
- $key : mixed = false
Return values
mixed —add_footer()
public
add_footer(mixed $heading[, mixed $attributes = false ][, mixed $key = false ][, mixed $use_th = true ]) : mixed
Parameters
- $heading : mixed
- $attributes : mixed = false
- $key : mixed = false
- $use_th : mixed = true
Return values
mixed —add_header()
public
add_header(mixed $heading[, mixed $attributes = false ][, mixed $key = false ][, mixed $use_th = true ]) : mixed
Parameters
- $heading : mixed
- $attributes : mixed = false
- $key : mixed = false
- $use_th : mixed = true
Return values
mixed —get_data()
public
get_data() : mixed
Return values
mixed —new_row()
public
new_row([mixed $atts = false ]) : mixed
Parameters
- $atts : mixed = false
Return values
mixed —reset()
public
reset() : mixed
Return values
mixed —reset_data()
public
reset_data() : mixed
Return values
mixed —set_data()
public
set_data(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —to_array()
public
to_array([mixed $data_only = false ]) : mixed
Parameters
- $data_only : mixed = false
Return values
mixed —to_html()
public
to_html([mixed $data_only = false ]) : mixed
Parameters
- $data_only : mixed = false
Return values
mixed —to_json()
public
to_json([mixed $data_only = false ]) : mixed
Parameters
- $data_only : mixed = false