Example #1
0
 private function dispatch(Route $route_)
 {
     $controller = $route_->createController($this->router, $this->request, $this->response, $this->auth);
     $action = $route_->getAction() . 'Action';
     if (!method_exists($controller, $action)) {
         throw new \Exception('Unknow method ' . $action . ' in ' . get_class($controller), 1);
     }
     echo $controller->{$action}();
     return;
 }