/** * Calls the controller linked to the route with the right params * * @param Route $route The route that matched the requested URI * @param array $params an array containing the parameters sent by the user through the URI * * @return void */ public function dispatch(Route $route, array $params) { list($className, $method) = explode(':', $route->getController()); $className .= 'Controller'; $controller = new $className($this->container); return call_user_func_array(array($controller, $method), $params); }