Example #1
0
 public function __construct($request, $response, $params = NULL)
 {
     parent::__construct($request, $response, $params);
     if (!$this->user->hasLogin()) {
         $this->response->redirect($this->___loginUrl() . '?redir=' . $this->request->getRequestUrl());
     }
 }
Example #2
0
 public function __construct($request, $response, $params = NULL)
 {
     parent::__construct($request, $response, $params);
     $this->parameter->setDefault(array('type' => NULL));
     /** 用于判断是路由调用还是外部调用 */
     if (NULL == $this->parameter->type) {
         $this->parameter->type = Typecho_Router::$current;
     } else {
         $this->_invokeFromOutside = true;
     }
 }
Example #3
0
 public function __construct($request, $response, $params = NULL)
 {
     parent::__construct($request, $response, $params);
     $this->_themeDir = rtrim($this->options->themeFile($this->options->theme), '/') . '/';
     /** 初始化皮肤函数 */
     $functionsFile = $this->_themeDir . 'functions.php';
     if (file_exists($functionsFile)) {
         require_once $functionsFile;
         if (function_exists('themeInit')) {
             themeInit($this);
         }
     }
 }
Example #4
0
 public function __construct($request, $response, $params = NULL)
 {
     parent::__construct($request, $response, $params);
 }