Exemplo n.º 1
0
Arquivo: Regex.php Projeto: vimac/zan
 public function __construct()
 {
     $routeConfig = Config::get('route');
     $rules = $routeConfig['rewrite'];
     $rules = array_merge($rules, $routeConfig['tiny_url_rules']);
     $this->formatRules($rules);
 }
Exemplo n.º 2
0
 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']);
 }
Exemplo n.º 3
0
 private function initFilter()
 {
     $filters = Config::get($this->filterConfKey);
     FilterLoader::loadFilter($filters);
 }
Exemplo n.º 4
0
 public function initTcpServer()
 {
     $config = Config::get($this->serverConfKey);
     $this->server = new TcpServer($config);
     $this->server->init();
 }
Exemplo n.º 5
0
 public function testGetConfigWork()
 {
     $data = Config::get('a.b.c');
     $data = Config::get('dir/a.b.c');
 }
Exemplo n.º 6
0
Arquivo: Router.php Projeto: vimac/zan
 public function __construct()
 {
     $this->config = Config::get('route');
 }