示例#1
0
 public static function getInstance($environment = null, $options = null)
 {
     if (self::$_application == null) {
         self::$_application = new Core_Application();
         include_once LIBRARY_PATH . '/Core/Loader.php';
         // Registry auto loader
         spl_autoload_register(array(new Core_Loader($options), 'autoload'));
         self::$_application->_environment = $environment;
         self::$_application->_setOptions($options);
         self::$_application->_setExceptionHandler();
     }
     return self::$_application;
 }