/** * initialize. * * @internal * * @var bool */ public function __construct() { $this->sid = Request::getStrParam('sid'); if (empty($this->sid)) { self::sendNotFound(); } $this->executeShow(); }
/** * initialize. * * @internal */ public function __construct() { if (!Session::isLoggedIn()) { exit; } $this->query = Request::getStrParam('q', Request::getStrParam('term')); $this->querySimiliar = strlen($this->query) > 1 ? $this->query . '%' : ''; parent::__construct(); }
/** * Initialize the form property. * * @api */ protected function initializeForm($namespace = null) { if ($namespace !== null) { $classname = $namespace . '\\'; } else { $classname = Application::$NAMESPACE . 'form\\'; } $classname .= Router::getModule() . 'Form'; $show = Request::getStrParam('show'); $this->form = new $classname(); if (method_exists($classname, $show)) { $this->form->{$show}(); $this->form->setActive(true); } }