/** run action (entry pooint) */ function run($action = null) { if (preg_match('/[^\\w_-]/', $this->params->op)) { throw new controller_exception(__METHOD__ . ': Bad action'); } $action = $action ?: $this->params->op; $action = $action ?: 'index'; $this->run_before(); $this->render_controller(); $this->action($action); if (!$this->_disable_render) { $this->render(); } $this->renderer->set_page_title($this->title); $this->run_after(); // visible in templates as {$controller.key} $this->renderer->set_data('controller', $this->response->as_array()); }
/** * Direct to renderer * * @param mixed $t * @param mixed $append */ function set_title($t, $append = true) { $t = $this->context->T($t); $this->renderer->set_page_title($t, $append); }