Kernel
in package
implements
Kernel
Interfaces, Classes and Traits
Table of Contents
- $app : Application
- The application implementation.
- $bootstrappers : array<string|int, mixed>
- The bootstrap classes for the application.
- $middleware : array<string|int, mixed>
- The application's middleware stack.
- $middlewareGroups : array<string|int, mixed>
- The application's route middleware groups.
- $middlewarePriority : array<string|int, mixed>
- The priority-sorted list of middleware.
- $routeMiddleware : array<string|int, mixed>
- The application's route middleware.
- $router : Router
- The router instance.
- __construct() : void
- Create a new HTTP kernel instance.
- bootstrap() : void
- Bootstrap the application for HTTP requests.
- getApplication() : Application
- Get the Laravel application instance.
- handle() : Response
- Handle an incoming HTTP request.
- hasMiddleware() : bool
- Determine if the kernel has a given middleware.
- prependMiddleware() : $this
- Add a new middleware to beginning of the stack if it does not already exist.
- pushMiddleware() : $this
- Add a new middleware to end of the stack if it does not already exist.
- terminate() : void
- Call the terminate method on any terminable middleware.
- bootstrappers() : array<string|int, mixed>
- Get the bootstrap classes for the application.
- dispatchToRouter() : Closure
- Get the route dispatcher callback.
- gatherRouteMiddleware() : array<string|int, mixed>
- Gather the route middleware for the given request.
- parseMiddleware() : array<string|int, mixed>
- Parse a middleware string to get the name and parameters.
- renderException() : Response
- Render the exception to a response.
- reportException() : void
- Report the exception to the exception handler.
- sendRequestThroughRouter() : Response
- Send the given request through the middleware / router.
- terminateMiddleware() : void
- Call the terminate method on any terminable middleware.
Properties
$app
The application implementation.
protected
Application
$app
$bootstrappers
The bootstrap classes for the application.
protected
array<string|int, mixed>
$bootstrappers
= [IlluminateFoundationBootstrapLoadEnvironmentVariables::class, IlluminateFoundationBootstrapLoadConfiguration::class, IlluminateFoundationBootstrapHandleExceptions::class, IlluminateFoundationBootstrapRegisterFacades::class, IlluminateFoundationBootstrapRegisterProviders::class, IlluminateFoundationBootstrapBootProviders::class]
$middleware
The application's middleware stack.
protected
array<string|int, mixed>
$middleware
= []
$middlewareGroups
The application's route middleware groups.
protected
array<string|int, mixed>
$middlewareGroups
= []
$middlewarePriority
The priority-sorted list of middleware.
protected
array<string|int, mixed>
$middlewarePriority
= [IlluminateSessionMiddlewareStartSession::class, IlluminateViewMiddlewareShareErrorsFromSession::class, IlluminateAuthMiddlewareAuthenticate::class, IlluminateSessionMiddlewareAuthenticateSession::class, IlluminateRoutingMiddlewareSubstituteBindings::class, IlluminateAuthMiddlewareAuthorize::class]
Forces the listed middleware to always be in the given order.
$routeMiddleware
The application's route middleware.
protected
array<string|int, mixed>
$routeMiddleware
= []
$router
The router instance.
protected
Router
$router
Methods
__construct()
Create a new HTTP kernel instance.
public
__construct(Application $app, Router $router) : void
Parameters
- $app : Application
- $router : Router
Return values
void —bootstrap()
Bootstrap the application for HTTP requests.
public
bootstrap() : void
Return values
void —getApplication()
Get the Laravel application instance.
public
getApplication() : Application
Return values
Application —handle()
Handle an incoming HTTP request.
public
handle(Request $request) : Response
Parameters
- $request : Request
Return values
Response —hasMiddleware()
Determine if the kernel has a given middleware.
public
hasMiddleware(string $middleware) : bool
Parameters
- $middleware : string
Return values
bool —prependMiddleware()
Add a new middleware to beginning of the stack if it does not already exist.
public
prependMiddleware(string $middleware) : $this
Parameters
- $middleware : string
Return values
$this —pushMiddleware()
Add a new middleware to end of the stack if it does not already exist.
public
pushMiddleware(string $middleware) : $this
Parameters
- $middleware : string
Return values
$this —terminate()
Call the terminate method on any terminable middleware.
public
terminate(Request $request, Response $response) : void
Parameters
Return values
void —bootstrappers()
Get the bootstrap classes for the application.
protected
bootstrappers() : array<string|int, mixed>
Return values
array<string|int, mixed> —dispatchToRouter()
Get the route dispatcher callback.
protected
dispatchToRouter() : Closure
Return values
Closure —gatherRouteMiddleware()
Gather the route middleware for the given request.
protected
gatherRouteMiddleware(Request $request) : array<string|int, mixed>
Parameters
- $request : Request
Return values
array<string|int, mixed> —parseMiddleware()
Parse a middleware string to get the name and parameters.
protected
parseMiddleware(string $middleware) : array<string|int, mixed>
Parameters
- $middleware : string
Return values
array<string|int, mixed> —renderException()
Render the exception to a response.
protected
renderException(Request $request, Exception $e) : Response
Parameters
- $request : Request
- $e : Exception
Return values
Response —reportException()
Report the exception to the exception handler.
protected
reportException(Exception $e) : void
Parameters
- $e : Exception
Return values
void —sendRequestThroughRouter()
Send the given request through the middleware / router.
protected
sendRequestThroughRouter(Request $request) : Response
Parameters
- $request : Request
Return values
Response —terminateMiddleware()
Call the terminate method on any terminable middleware.
protected
terminateMiddleware(Request $request, Response $response) : void