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 17
void bootstrap()

Bootstrap the application for HTTP requests.

Return Value

void

at line 22
Response handle(Request $request)

Handle an incoming HTTP request.

Parameters

Request $request

Return Value

Response

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

Perform any final actions for the request lifecycle.

Parameters

Request $request
Response $response

Return Value

void

at line 32
bool hasMiddleware(string $middleware)

Determine if the kernel has a given middleware.

Parameters

string $middleware

Return Value

bool

at line 42
Kernel prependMiddleware(string $middleware)

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

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 53
Kernel pushMiddleware(string $middleware)

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

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 64
Kernel prependMiddlewareToGroup(string $group, string $middleware)

Prepend the given middleware to the given middleware group.

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 75
Kernel appendMiddlewareToGroup(string $group, string $middleware)

Append the given middleware to the given middleware group.

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 86
Kernel prependToMiddlewarePriority(string $middleware)

Prepend the given middleware to the middleware priority list.

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 97
Kernel appendToMiddlewarePriority(string $middleware)

Append the given middleware to the middleware priority list.

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 109
Kernel addToMiddlewarePriorityBefore(string|array $before, string $middleware)

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

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 121
Kernel addToMiddlewarePriorityAfter(string|array $after, string $middleware)

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

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 129
array getMiddlewarePriority()

Get the priority-sorted list of middleware.

Return Value

array

at line 136
array getGlobalMiddleware()

Get the application's global middleware.

Return Value

array

at line 147
Kernel setGlobalMiddleware(array $middleware)

Set the application's global middleware.

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 155
array getMiddlewareGroups()

Get the application's route middleware groups.

Return Value

array

at line 166
Kernel setMiddlewareGroups(array $groups)

Set the application's middleware groups.

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 174
array getMiddlewareAliases()

Get the application's route middleware aliases.

Return Value

array

at line 185
Kernel setMiddlewareAliases(array $aliases)

Set the application's route middleware aliases.

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 197
Kernel setMiddlewarePriority(array $priority)

Set the application's middleware priority.

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 203
Application getApplication()

Get the application instance.

Return Value

Application