interface Kernel

Methods

void
bootstrap()

Bootstrap the application for HTTP requests.

Response
handle(Request $request)

Handle an incoming HTTP request.

void
terminate(Request $request, Response $response)

Perform any final actions for the request lifecycle.

bool
hasMiddleware(string $middleware)

Determine if the kernel has a given middleware.

prependMiddleware(string $middleware)

Add a new middleware to the beginning of the stack if it does not already exist.

pushMiddleware(string $middleware)

Add a new middleware to the end of the stack if it does not already exist.

prependMiddlewareToGroup(string $group, string $middleware)

Prepend the given middleware to the given middleware group.

appendMiddlewareToGroup(string $group, string $middleware)

Append the given middleware to the given middleware group.

prependToMiddlewarePriority(string $middleware)

Prepend the given middleware to the middleware priority list.

appendToMiddlewarePriority(string $middleware)

Append the given middleware to the middleware priority list.

addToMiddlewarePriorityBefore(string|array $before, string $middleware)

Add the given middleware to the middleware priority list before other middleware.

addToMiddlewarePriorityAfter(string|array $after, string $middleware)

Add the given middleware to the middleware priority list after other middleware.

array
getMiddlewarePriority()

Get the priority-sorted list of middleware.

array
getGlobalMiddleware()

Get the application's global middleware.

setGlobalMiddleware(array $middleware)

Set the application's global middleware.

array
getMiddlewareGroups()

Get the application's route middleware groups.

setMiddlewareGroups(array $groups)

Set the application's middleware groups.

array
getMiddlewareAliases()

Get the application's route middleware aliases.

setMiddlewareAliases(array $aliases)

Set the application's route middleware aliases.

setMiddlewarePriority(array $priority)

Set the application's middleware priority.

getApplication()

Get the application instance.

Details

at line 16
void bootstrap()

Bootstrap the application for HTTP requests.

Return Value

void

at line 21
Response handle(Request $request)

Handle an incoming HTTP request.

Parameters

Request $request

Return Value

Response

at line 26
void terminate(Request $request, Response $response)

Perform any final actions for the request lifecycle.

Parameters

Request $request
Response $response

Return Value

void

at line 31
bool hasMiddleware(string $middleware)

Determine if the kernel has a given middleware.

Parameters

string $middleware

Return Value

bool

at line 41
Kernel prependMiddleware(string $middleware)

Add a new middleware to the beginning of the stack if it does not already exist.

Boot-only. Middleware persists in the kernel's global stack for the worker lifetime and runs on every subsequent request across all coroutines.

Parameters

string $middleware

Return Value

Kernel

at line 51
Kernel pushMiddleware(string $middleware)

Add a new middleware to the end of the stack if it does not already exist.

Boot-only. Middleware persists in the kernel's global stack for the worker lifetime and runs on every subsequent request across all coroutines.

Parameters

string $middleware

Return Value

Kernel

at line 61
Kernel prependMiddlewareToGroup(string $group, string $middleware)

Prepend the given middleware to the given middleware group.

Boot-only. The middleware group persists in the kernel for the worker lifetime and runs on every subsequent request matching the group.

Parameters

string $group
string $middleware

Return Value

Kernel

at line 71
Kernel appendMiddlewareToGroup(string $group, string $middleware)

Append the given middleware to the given middleware group.

Boot-only. The middleware group persists in the kernel for the worker lifetime and runs on every subsequent request matching the group.

Parameters

string $group
string $middleware

Return Value

Kernel

at line 81
Kernel prependToMiddlewarePriority(string $middleware)

Prepend the given middleware to the middleware priority list.

Boot-only. The middleware priority list persists in the kernel for the worker lifetime and affects middleware ordering for every subsequent request.

Parameters

string $middleware

Return Value

Kernel

at line 91
Kernel appendToMiddlewarePriority(string $middleware)

Append the given middleware to the middleware priority list.

Boot-only. The middleware priority list persists in the kernel for the worker lifetime and affects middleware ordering for every subsequent request.

Parameters

string $middleware

Return Value

Kernel

at line 102
Kernel addToMiddlewarePriorityBefore(string|array $before, string $middleware)

Add the given middleware to the middleware priority list before other middleware.

Boot-only. The middleware priority list persists in the kernel for the worker lifetime and affects middleware ordering for every subsequent request.

Parameters

string|array $before
string $middleware

Return Value

Kernel

at line 113
Kernel addToMiddlewarePriorityAfter(string|array $after, string $middleware)

Add the given middleware to the middleware priority list after other middleware.

Boot-only. The middleware priority list persists in the kernel for the worker lifetime and affects middleware ordering for every subsequent request.

Parameters

string|array $after
string $middleware

Return Value

Kernel

at line 120
array getMiddlewarePriority()

Get the priority-sorted list of middleware.

Return Value

array

at line 127
array getGlobalMiddleware()

Get the application's global middleware.

Return Value

array

at line 138
Kernel setGlobalMiddleware(array $middleware)

Set the application's global middleware.

Boot-only. Middleware persists in the kernel's global stack for the worker lifetime and runs on every subsequent request across all coroutines.

Parameters

array $middleware

Return Value

Kernel

at line 145
array getMiddlewareGroups()

Get the application's route middleware groups.

Return Value

array

at line 156
Kernel setMiddlewareGroups(array $groups)

Set the application's middleware groups.

Boot-only. Middleware groups persist in the kernel for the worker lifetime and affect every subsequent request matching those groups.

Parameters

array $groups

Return Value

Kernel

at line 163
array getMiddlewareAliases()

Get the application's route middleware aliases.

Return Value

array

at line 174
Kernel setMiddlewareAliases(array $aliases)

Set the application's route middleware aliases.

Boot-only. Middleware aliases persist in the kernel for the worker lifetime and affect every subsequent request that uses them.

Parameters

array $aliases

Return Value

Kernel

at line 185
Kernel setMiddlewarePriority(array $priority)

Set the application's middleware priority.

Boot-only. The middleware priority list persists in the kernel for the worker lifetime and affects middleware ordering for every subsequent request.

Parameters

array $priority

Return Value

Kernel

at line 190
Application getApplication()

Get the application instance.

Return Value

Application