示例#1
0
 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;
         }
     }
 }
示例#2
0
 protected function __construct(&$vars = array())
 {
     parent::__construct($vars);
 }