HTTPApplication
class HTTPApplication implements Application (View source)
Invokes the HTTP application within an ErrorControlChain
Traits
Adds middleware support to an object.
Methods
$this
execute(HTTPRequest $request, callable $callback, bool $flush = false)
Safely boot the application and execute the given main action
Details
HTTPMiddleware[]
getMiddlewares()
$this
setMiddlewares(HTTPMiddleware[] $middlewares)
$this
addMiddleware(HTTPMiddleware $middleware)
__construct(Kernel $kernel)
Initialize the application with a kernel instance
$this
setFlushDiscoverer(FlushDiscoverer $discoverer)
Override the default flush discovery
FlushDiscoverer
getFlushDiscoverer(HTTPRequest $request)
Returns the current flush discoverer
Kernel
getKernel()
Get the kernel for this application
HTTPResponse
handle(HTTPRequest $request)
Handle the given HTTP request
HTTPResponse
execute(HTTPRequest $request, callable $callback, bool $flush = false)
Safely boot the application and execute the given main action