public function __construct($name) { parent::__construct(); $path = PATH . "/themes/" . $name . "/theme.xml"; // load the theme settings file if it exists if ($xml = get_file($path)) { // load xml object, and convert it to an array $settings = object2array(simplexml_load_string($xml)); } else { $settings = array(); } $path = PATH . "/themes/" . $name . "/macros.xml"; // load the theme settings file if it exists if ($xml = get_file($path)) { // load xml object, and convert it to an array $settings['macros'] = object2array(simplexml_load_string($xml)); } else { $settings['macros'] = array(); } $settings['path'] = $name; $settings['name'] = $name; foreach ($settings as $key => $value) { if ($value !== "" && $value !== " ") { $this->Settings[$key] = $value; } } }
protected function __construct(&$vars = array()) { parent::__construct($vars); }