HttpKernel
class HttpKernel implements HttpKernelInterface (View source)
Describes how a request is handled.
Traits
Methods
Register middleware groups.
Filter array of middleware into a unique set.
Expand array of middleware into an array of fully qualified class names.
Expand a middleware group into an array of fully qualified class names.
Expand middleware into an array of fully qualified class names and any companion arguments.
Expand a single middleware a fully qualified class name.
Set middleware execution priority.
Get priority for a specific middleware.
Sort array of fully qualified middleware class names by priority in ascending order.
Constructor.
Run a response pipeline for the given request.
Respond with the current response.
Output the current view outside of the routing flow.
Bootstrap the kernel.
Filter the main query vars.
Filter the main template file.
Register ajax action to hook into current one.
Act on ajax action.
Register admin action to hook into current one.
Act on admin action load.
Act on admin action.
Details
void
setMiddleware(array $middleware)
Register middleware.
void
setMiddlewareGroups(array $middleware_groups)
Register middleware groups.
string[]
uniqueMiddleware(array[] $middleware)
Filter array of middleware into a unique set.
array[]
expandMiddleware(string[] $middleware)
Expand array of middleware into an array of fully qualified class names.
array[]
expandMiddlewareGroup(string $group)
Expand a middleware group into an array of fully qualified class names.
array[]
expandMiddlewareMolecule(string $middleware)
Expand middleware into an array of fully qualified class names and any companion arguments.
string
expandMiddlewareAtom(string $middleware)
Expand a single middleware a fully qualified class name.
in SortsMiddlewareTrait at line 29
string[]
getMiddlewarePriority()
Get middleware execution priority.
in SortsMiddlewareTrait at line 40
void
setMiddlewarePriority(string[] $middleware_priority)
Set middleware execution priority.
in SortsMiddlewareTrait at line 52
integer
getMiddlewarePriorityForMiddleware(string|array $middleware)
Get priority for a specific middleware.
This is in reverse compared to definition order. Middleware with unspecified priority will yield -1.
in SortsMiddlewareTrait at line 68
array
sortMiddleware(string[] $middleware)
Sort array of fully qualified middleware class names by priority in ascending order.
at line 118
__construct(Container $container, GenericFactory $factory, HandlerFactory $handler_factory, ResponseService $response_service, RequestInterface $request, Router $router, ViewService $view_service, ErrorHandlerInterface $error_handler)
Constructor.
at line 193
ResponseInterface
run(RequestInterface $request, string[] $middleware, string|Closure|Handler $handler, array $arguments = [])
Run a response pipeline for the given request.
at line 219
ResponseInterface|null
handle(RequestInterface $request, array $arguments = [])
Return a response for the given request.
at line 253
void
respond()
Respond with the current response.
at line 268
void
compose()
Output the current view outside of the routing flow.
at line 278
void
bootstrap()
Bootstrap the kernel.
at line 298
array
filterRequest(array $query_vars)
Filter the main query vars.
at line 326
string
filterTemplateInclude(string $template)
Filter the main template file.
at line 362
void
registerAjaxAction()
Register ajax action to hook into current one.
at line 379
void
actionAjax()
Act on ajax action.
at line 445
void
registerAdminAction()
Register admin action to hook into current one.
at line 458
void
actionAdminLoad()
Act on admin action load.
at line 475
void
actionAdmin()
Act on admin action.