Frisbee\Bootstrap\AbstractBootstrap::next PHP Method

next() public method

public next ( )
    public function next()
    {
        // assume match is an array, because otherwise it would throw an exception
        $matchedRoute = $this->getRoute();
        $controllerClass = $matchedRoute['controller'];
        if (strpos($controllerClass, '\\') === false) {
            $controllerClass = 'App\\Controllers\\' . ucfirst($controllerClass);
        }
        if (array_key_exists('action', $matchedRoute)) {
            throw new $controllerClass($this, $matchedRoute['action']);
        }
        throw new $controllerClass($this);
    }