Example #1
0
 public function __construct()
 {
     $system = CoreLoader::$system;
     date_default_timezone_set($system['default_timezone']);
     $this->registerErrorHandle();
     $this->router = CoreInput::$router;
     $this->input = new CoreInput();
     $this->model = new CoreModelLoader();
     $this->lib = new CoreLibLoader();
     $this->rule = new CoreRule();
     $this->cache = phpFastCache::getInstance($system['cache_config']['storage'], $system['cache_config']);
     if ($system['autoload_db']) {
         $this->database();
     }
     if (!empty($system['language'])) {
         self::$locale = new CoreLocale($system['language']);
     }
     Fn::stripslashes_all();
 }
Example #2
0
 public function __construct()
 {
     $system = WoniuLoader::$system;
     date_default_timezone_set($system['default_timezone']);
     $this->registerErrorHandle();
     $this->router = WoniuInput::$router;
     $this->input = new WoniuInput();
     $this->model = new WoniuModelLoader();
     $this->lib = new WoniuLibLoader();
     if (class_exists('WoniuRule', FALSE)) {
         $this->rule = new WoniuRule();
     }
     if (class_exists('phpFastCache', false)) {
         $this->cache = phpFastCache::getInstance($system['cache_config']['storage'], $system['cache_config']);
     }
     if ($system['autoload_db']) {
         $this->database();
     }
     stripslashes_all();
 }
Example #3
0
 public function __construct()
 {
     $system = WoniuLoader::$system;
     //配置文件
     date_default_timezone_set($system['default_timezone']);
     //设置时区
     $this->registerErrorHandle();
     //添加自定义处理错误方法
     $this->router = WoniuInput::$router;
     //解析的路径数组
     $this->input = new WoniuInput();
     //WoniuInput对象
     $this->model = new WoniuModelLoader();
     //WoniuModelLoader对象
     $this->lib = new WoniuLibLoader();
     //WoniuLibLoader对象
     if (class_exists('WoniuRule', FALSE)) {
         $this->rule = new WoniuRule();
         //WoniuRule对象
     }
     if (class_exists('phpFastCache', false)) {
         $this->cache = phpFastCache::getInstance($system['cache_config']['storage'], $system['cache_config']);
     }
     if ($system['autoload_db']) {
         $this->database();
         //返回WoniuDB对象:单例模式
     }
     stripslashes_all();
 }
 public function __construct()
 {
     $system = CoreLoader::$system;
     $this->phpFastCache = phpFastCache::getInstance($system['cache_config']['storage'], $system['cache_config']);
 }