RequestHandler
class RequestHandler implements HttpRequestHandlerInterface (View source)
A request handler which can handle HTTP requests.
Properties
protected Bootstrap | $bootstrap | ||
protected MiddlewaresChain | $middlewaresChain | ||
protected ComponentContext | $componentContext | ||
Closure | $exit | Make exit() a closure so it can be manipulated during tests |
Methods
This request handler can handle any web request.
Returns the priority - how eager the handler is to actually handle the request.
Handles a HTTP request
No description
Returns the currently handled HTTP request
Returns the HTTP response corresponding to the currently handled request
Boots up Flow to runtime
Resolves a few dependencies of this request handler which can't be resolved automatically due to the early stage of the boot process this request handler is invoked at.
Send the HttpResponse of the component context to the browser and flush all output buffers.
Details
__construct(Bootstrap $bootstrap)
No description
mixed
canHandleRequest()
This request handler can handle any web request.
int
getPriority()
Returns the priority - how eager the handler is to actually handle the request.
void
handleRequest()
Handles a HTTP request
ComponentContext
getComponentContext()
No description
ServerRequestInterface
getHttpRequest()
Returns the currently handled HTTP request
ResponseInterface
getHttpResponse()
Returns the HTTP response corresponding to the currently handled request
protected void
boot()
Boots up Flow to runtime
protected void
resolveDependencies()
Resolves a few dependencies of this request handler which can't be resolved automatically due to the early stage of the boot process this request handler is invoked at.
protected
sendResponse(ResponseInterface $response)
Send the HttpResponse of the component context to the browser and flush all output buffers.