class Illuminate / Foundation / Http / Kernel
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Kernel

Implements

Properties

protected

$app Application

The application implementation.

Default: null
protected

$router Router

The router instance.

Default: null
protected

$bootstrappers string[]

The bootstrap classes for the application.

Default: array
protected

$middleware array

The application's middleware stack.

Default: []
protected

$middlewareGroups array

The application's route middleware groups.

Default: []
protected

$routeMiddleware array

The application's route middleware.

Default: []
protected

$middlewarePriority string[]

The priority-sorted list of middleware.

Forces non-global middleware to always be in the given order.

Default: array

Methods

public

__construct ( Application $app , Router $router ) : void

Create a new HTTP kernel instance.

Parameters

public

handle ( $request ) : Response

Handle an incoming HTTP request.

Parameters

protected

sendRequestThroughRouter ( $request ) : Response

Send the given request through the middleware / router.

Parameters

public

bootstrap ( ) : void

Bootstrap the application for HTTP requests.

protected

dispatchToRouter ( ) : Closure

Get the route dispatcher callback.

public

terminate ( $request , $response ) : void

Call the terminate method on any terminable middleware.

Parameters

protected

terminateMiddleware ( $request , $response ) : void

Call the terminate method on any terminable middleware.

Parameters

protected

gatherRouteMiddleware ( $request ) : array

Gather the route middleware for the given request.

Parameters

protected

parseMiddleware ( $middleware ) : array

Parse a middleware string to get the name and parameters.

Parameters

  • $middleware string
public

hasMiddleware ( $middleware ) : bool

Determine if the kernel has a given middleware.

Parameters

  • $middleware string
public

prependMiddleware ( $middleware ) : $this

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

Parameters

  • $middleware string
public

pushMiddleware ( $middleware ) : $this

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

Parameters

  • $middleware string
public

prependMiddlewareToGroup ( $group , $middleware ) : $this

Prepend the given middleware to the given middleware group.

Parameters

  • $group string
  • $middleware string
public

appendMiddlewareToGroup ( $group , $middleware ) : $this

Append the given middleware to the given middleware group.

Parameters

  • $group string
  • $middleware string
public

prependToMiddlewarePriority ( $middleware ) : $this

Prepend the given middleware to the middleware priority list.

Parameters

  • $middleware string
public

appendToMiddlewarePriority ( $middleware ) : $this

Append the given middleware to the middleware priority list.

Parameters

  • $middleware string
protected

syncMiddlewareToRouter ( ) : void

Sync the current state of the middleware to the router.

public

getMiddlewarePriority ( ) : array

Get the priority-sorted list of middleware.

protected

bootstrappers ( ) : array

Get the bootstrap classes for the application.

protected

reportException ( Throwable $e ) : void

Report the exception to the exception handler.

Parameters

protected

renderException ( $request , Throwable $e ) : Symfony\...\Response

Render the exception to a response.

Parameters

public

getMiddlewareGroups ( ) : array

Get the application's route middleware groups.

public

getRouteMiddleware ( ) : array

Get the application's route middleware.

public

getApplication ( ) : Application

Get the Laravel application instance.

public

setApplication ( Application $app ) : $this

Set the Laravel application instance.

Parameters