示例#1
0
文件: Wiz.php 项目: nvahalik/Wiz
 public static function getConfig()
 {
     if (empty(self::$config)) {
         $potentialFilesToLoad = array(dirname(__FILE__) . WIZ_DS . 'config.xml', dirname(__FILE__) . WIZ_DS . '..' . WIZ_DS . 'config.xml', $_SERVER['HOME'] . WIZ_DS . '.wiz.xml');
         self::$config = simplexml_load_string('<config />', 'Wiz_Simplexml_Element');
         foreach ($potentialFilesToLoad as $filePath) {
             if (file_exists($filePath)) {
                 self::$config->extendByFile($filePath);
             }
         }
     }
     return self::$config;
 }