summaryrefslogtreecommitdiffstats
path: root/system/libraries/Table.php
diff options
context:
space:
mode:
authorRoger Herbert <rogerlherbert@gmail.com>2012-03-14 09:37:06 +0100
committerRoger Herbert <rogerlherbert@gmail.com>2012-03-14 09:37:06 +0100
commita5c8a6d0fb7802aaf284b7b3ef77966f43baae56 (patch)
tree12163c9d08070e73b025dd0a6fc602bccc606e90 /system/libraries/Table.php
parentb81f909f8aaa3bedc3820c0d4c9056b57113b46e (diff)
parentce707b4cafd64b95031690cf927584b1d60c7ad7 (diff)
timespan() helper change
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 8651b9e69..99d001ce5 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;
+ }
}
// --------------------------------------------------------------------