Bluz\Application\Application::doDispatch PHP Method

doDispatch() protected method

Do dispatch
protected doDispatch ( string $module, string $controller, array $params = [] ) : Controller
$module string
$controller string
$params array
return Bluz\Controller\Controller
    protected function doDispatch($module, $controller, $params = [])
    {
        // @TODO: try to find custom controller class
        // create controller controller
        $controllerInstance = new Controller($module, $controller);
        // check HTTP Accept header
        $controllerInstance->checkAccept();
        // check HTTP method
        $controllerInstance->checkMethod();
        // check ACL privileges
        $controllerInstance->checkPrivilege();
        // run controller
        $controllerInstance->run($params);
        return $controllerInstance;
    }