src/Controller.php
public function run()
    {
        $request = ServerRequestFactory::fromGlobals();
        $this->pipeline->build()
            ->pipe(new Stage(function (ResponseInterface $response = null) {
                $emitter = new SapiEmitter;
                if (is_null($response)) {
                    throw new Exception(404);
                }
                return $emitter->emit($response);
            }))
            ->process($request);
    }
public function run()
    {
        $request = ServerRequestFactory::fromGlobals();
        $this->pipeline->build()
            ->pipe(new Stage(function (ResponseInterface $response = null) {
                $emitter = new SapiEmitter;
                if (is_null($response)) {
                    throw new Exception(404);
                }
                return $emitter->emit($response);
            }))
            ->process($request);
    }
public function run ( ) { $ request = ServerRequestFactory :: fromGlobals ( ) ; $ this -> pipeline -> build ( ) -> pipe ( new Stage ( function ( ResponseInterface $ response = null ) { $ emitter = new SapiEmitter ; if ( is_null ( $ response ) ) { throw new Exception ( 404 ) ; } return $ emitter -> emit ( $ response ) ; } ) ) -> process ( $ request ) ; }
Run the HTTP kernel controller. This processes your pipeline and emits
the resulting response.

@throws Error|Exception If any error or exception gets thrown during
processing, your front controller should handle that gracefully (or not
so gracefully if you're still developing).
Run the HTTP kernel controller . This processes your pipeline and emits the resulting response .