2 // @title Canvas core class
3 // @author Matt Todd <matt@matttoddphoto.com>
5 // @desc The core class every major Canvas component inherets from
6 // @requires stdexception.php (StdException class)
7 // @note Yes, it came a little late in the game.
9 include_once('stdexception.php');
13 protected $config = array();
15 // loads the configuration for the current component if no other config data is requested
16 protected function load_config($config_section = null) {
17 $config = new Config2(); // load the configuration
19 // determine section, if any
20 if($config_section == true && !empty($this->config_section
)) $config_section = $this->config_section
; // if there's a special section name already set, use that
21 if($config_section == true) $config_section = strtolower(get_class()); // if nothing's been set, use the class name
24 $this->config
= ($config_section == null) ?
$config->config
: $config->$config_section;