Scalr\Api\Rest\Application::call PHP Méthode

call() public méthode

Application wide handler
public call ( )
    public function call()
    {
        $dispatched = null;
        try {
            ob_start();
            $matchedRoutes = $this->router->getMatchedRoutes($this->request->getMethod(), $this->request->getPathInfo(), $this->pathPreprocessor);
            foreach ($matchedRoutes as $route) {
                /* @var $route Route */
                $dispatched = $route->dispatch();
                if ($dispatched) {
                    break;
                }
            }
            if (!$dispatched) {
                $this->notFound();
            }
            $this->stop();
        } catch (StopException $e) {
            ob_end_clean();
        } catch (\Exception $e) {
            ob_end_clean();
            try {
                $this->error($e);
            } catch (StopException $e) {
            }
        }
    }