示例#1
0
文件: Regex.php 项目: vimac/zan
 public function __construct()
 {
     $routeConfig = Config::get('route');
     $rules = $routeConfig['rewrite'];
     $rules = array_merge($rules, $routeConfig['tiny_url_rules']);
     $this->formatRules($rules);
 }
示例#2
0
文件: Handler.php 项目: vimac/zan
 public static function initErrorHandler()
 {
     ini_set('display_errors', false);
     if (Config::get('debug')) {
         set_exception_handler(['Handler', 'handleException']);
     } else {
         set_exception_handler(['Handler', 'handleExceptionProduct']);
     }
     set_error_handler(['Handler', 'handleError']);
     register_shutdown_function(['Handler', 'handleFatalError']);
 }
示例#3
0
文件: Application.php 项目: vimac/zan
 private function initFilter()
 {
     $filters = Config::get($this->filterConfKey);
     FilterLoader::loadFilter($filters);
 }
示例#4
0
文件: Application.php 项目: vimac/zan
 public function initTcpServer()
 {
     $config = Config::get($this->serverConfKey);
     $this->server = new TcpServer($config);
     $this->server->init();
 }
示例#5
0
文件: ConfigTest.php 项目: vimac/zan
 public function testGetConfigWork()
 {
     $data = Config::get('a.b.c');
     $data = Config::get('dir/a.b.c');
 }
示例#6
0
文件: Router.php 项目: vimac/zan
 public function __construct()
 {
     $this->config = Config::get('route');
 }