class Controller_MyStuff extends Controller_Template public function router($method, $params) { if (!logged_in()) { // Not logged in. $this->template->title = 'Not logged in'; $this->template->content = View::forge('mycontroller/not_logged_in'); } else { // Logged in - carry on return call_user_func_array(array($this, 'action_' . $method), $params); } } ... }
Harro Verton wrote on Tuesday 20th of March 2012:No, this is how it should work.
It looks like you're new here. If you want to get involved, click one of these buttons!