summaryrefslogtreecommitdiffstats
path: root/system/libraries/Table.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-12 15:31:53 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-12 15:31:53 +0100
commite044d6c586728a28b291880dd37562f4a7551d36 (patch)
treecd309d72b20f6dbe11ae0d5ce0c7cf2168812ee7 /system/libraries/Table.php
parent4c4740ec492b30aeb47cb1829525247053e4adfe (diff)
parent802953234f0b7669333807aaa3f2318778cde187 (diff)
Merge upstream branch
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;
+ }
}
// --------------------------------------------------------------------