/** * Fetch the correct controller, check if the action exist and call the action, it also verify the access right */ public function init() { $controller = $this->getController(); if (array_key_exists($controller, $this->controllers)) { $action = $this->getAction(); $args = Controller::bindArgs($controller, $action, explode("/", $this->getArgs())); $this->callAction($this->controllers[$controller], $this->getAction(), $args); } else { $this->callAction(Dispatcher::DEFAULT_CONTROLLER); } }