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()); } }
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; } }
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); } } }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); }