summaryrefslogtreecommitdiffstats
path: root/system/libraries/Table.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-03-14 11:51:36 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-03-14 11:51:36 +0100
commit15a29e11a1003ff253b4df7c8a4c6e97b052a06d (patch)
tree8297ecf0727c574bd90cb12413f687f8413dce2e /system/libraries/Table.php
parent0fe8c8e21315e00dbc06a87290fb268a2dc999a9 (diff)
parentce707b4cafd64b95031690cf927584b1d60c7ad7 (diff)
Merged unit test progress.
Diffstat (limited to 'system/libraries/Table.php')
-rw-r--r--system/libraries/Table.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index 08590c0e0..11a4858a9 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -25,8 +25,6 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* HTML Table Generating Class
*
@@ -49,9 +47,21 @@ class CI_Table {
public $empty_cells = '';
public $function = FALSE;
- public function __construct()
+ /**
+ * Set the template from the table config file if it exists
+ *
+ * @param array $config (default: array())
+ * @return void
+ */
+ public function __construct($config = array())
{
- log_message('debug', "Table Class Initialized");
+ log_message('debug', 'Table Class Initialized');
+
+ // initialize config
+ foreach ($config as $key => $val)
+ {
+ $this->template[$key] = $val;
+ }
}
// --------------------------------------------------------------------