Example #1
0
 function __construct()
 {
     set_error_handler(array($this, 'ErrorCatcher'));
     $this->_config = $this->getDefaultSettings();
     $this->_request = \App\Request::getInstance();
     $this->_response = \App\Response::getInstance();
     //$this->_route = \App\Route::getInstance();
     $this->_logger = new \App\Log($this->_config['Logger']);
 }
Example #2
0
 /**
  * 跳转
  *
  * @param string $url
  * @param array $params 参数
  * @return Response
  */
 protected function redirect($url = '', $params = array())
 {
     if (substr($url, 0, 4) !== 'http') {
         $url = $this->url($url, $params);
     }
     $response = Response::getInstance();
     $response->redirect($url);
     return $response;
 }