summaryrefslogtreecommitdiffstats
path: root/system/libraries/Table.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-05-02 11:47:42 +0200
committerAndrey Andreev <narf@bofh.bg>2012-05-02 11:47:42 +0200
commitbd738c80a623700b3b11e876abb764ca6d57769d (patch)
tree7ceec96d9dc36bb524acff0946e9eb0db03f90d0 /system/libraries/Table.php
parent721c77fcf347751895623514fb2e4c89390afa67 (diff)
parent02b80cbe5aae7e474b097c149ab6479de9ab0f91 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-db-odbc
Diffstat (limited to 'system/libraries/Table.php')
-rw-r--r--system/libraries/Table.php52
1 files changed, 50 insertions, 2 deletions
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index 3777d29ff..236129531 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -38,13 +38,60 @@
*/
class CI_Table {
+ /**
+ * Data for table rows
+ *
+ * @var array
+ */
public $rows = array();
+
+ /**
+ * Data for table heading
+ *
+ * @var array
+ */
public $heading = array();
+
+ /**
+ * Whether or not to automatically create the table header
+ *
+ * @var bool
+ */
public $auto_heading = TRUE;
+
+ /**
+ * Table caption
+ *
+ * @var string
+ */
public $caption = NULL;
+
+ /**
+ * Table layout template
+ *
+ * @var array
+ */
public $template = NULL;
+
+ /**
+ * Newline setting
+ *
+ * @var string
+ */
public $newline = "\n";
+
+ /**
+ * Contents of empty cells
+ *
+ * @var string
+ */
public $empty_cells = '';
+
+ /**
+ * Callback for custom table layout
+ *
+ * @var function
+ */
public $function = FALSE;
/**
@@ -93,7 +140,7 @@ class CI_Table {
* @param mixed
* @return void
*/
- public function set_heading()
+ public function set_heading($args = array())
{
$args = func_get_args();
$this->heading = $this->_prep_args($args);
@@ -172,7 +219,7 @@ class CI_Table {
* @param mixed
* @return void
*/
- public function add_row()
+ public function add_row($args = array())
{
$args = func_get_args();
$this->rows[] = $this->_prep_args($args);
@@ -420,6 +467,7 @@ class CI_Table {
* Set table data from an array
*
* @param array
+ * @param bool
* @return void
*/
protected function _set_from_array($data, $set_heading = TRUE)