protected function _init()
 {
     Registry::set('app', $this);
     $this->request = new Request();
     $this->response = new Response($this->request);
     $this->request->parseUri();
     $this->front = new FrontController($this->request, $this->response);
     $this->_initLayout();
 }
示例#2
0
 /**
  * Configures ENV variable for ajax request and response type
  */
 public static function configureFromRequestHeader()
 {
     $env = Registry::get('ENV');
     if (self::checkAjax()) {
         $env->set('ajax', true);
         $respType = self::getResponseType();
         $env->set('responseType', $respType);
     } else {
         $env->set('ajax', false);
         $env->set('responseType', 'html');
     }
     Registry::set('ENV', $env);
 }