public function run(MatchablePipelineCollectionInterface $pipelines): ResponseInterface
    {
        try {
            // If a pipeline match print the response and return
            if ($handledResponse = $this->handlePipeline($pipelines)) {
                return $handledResponse;
            }

            // If a route pattern matched but the http verbs was different, print a '405 response'
            // If no route pattern matched, print a '404 response'
            $statusCode = $this->matchableRequest->isPatternMatched() ? StatusCodeInterface::STATUS_METHOD_NOT_ALLOWED : StatusCodeInterface::STATUS_NOT_FOUND;

            return $this->invalidRequestHandler->__invoke($this->matchableRequest->request(), $this->response->withStatus($statusCode));
        } catch (Throwable $e) {
            return $this->errorHandler->__invoke($e, $this->request, $this->response);
        }
    }
public function run(MatchablePipelineCollectionInterface $pipelines): ResponseInterface
    {
        try {
            // If a pipeline match print the response and return
            if ($handledResponse = $this->handlePipeline($pipelines)) {
                return $handledResponse;
            }

            // If a route pattern matched but the http verbs was different, print a '405 response'
            // If no route pattern matched, print a '404 response'
            $statusCode = $this->matchableRequest->isPatternMatched() ? StatusCodeInterface::STATUS_METHOD_NOT_ALLOWED : StatusCodeInterface::STATUS_NOT_FOUND;

            return $this->invalidRequestHandler->__invoke($this->matchableRequest->request(), $this->response->withStatus($statusCode));
        } catch (Throwable $e) {
            return $this->errorHandler->__invoke($e, $this->request, $this->response);
        }
    }
public function run ( MatchablePipelineCollectionInterface $ pipelines ) : ResponseInterface { try { // If a pipeline match print the response and return if ( $ handledResponse = $ this -> handlePipeline ( $ pipelines ) ) { return $ handledResponse ; } // If a route pattern matched but the http verbs was different, print a '405 response' // If no route pattern matched, print a '404 response' $ statusCode = $ this -> matchableRequest -> isPatternMatched ( ) ? StatusCodeInterface :: STATUS_METHOD_NOT_ALLOWED : StatusCodeInterface :: STATUS_NOT_FOUND ; return $ this -> invalidRequestHandler -> __invoke ( $ this -> matchableRequest -> request ( ) , $ this -> response -> withStatus ( $ statusCode ) ) ; } catch ( Throwable $ e ) { return $ this -> errorHandler -> __invoke ( $ e , $ this -> request , $ this -> response ) ; } }
Run the web application, and print a Response.

@throws RuntimeException
Run the web application and print a Response .