diff options
Diffstat (limited to 'system/libraries/Table.php')
-rw-r--r-- | system/libraries/Table.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/system/libraries/Table.php b/system/libraries/Table.php index fb154e50f..99d001ce5 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -2,7 +2,7 @@ /** * CodeIgniter * - * An open source application development framework for PHP 5.1.6 or newer + * An open source application development framework for PHP 5.2.4 or newer * * NOTICE OF LICENSE * @@ -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; + } } // -------------------------------------------------------------------- |