PHP Class Dingo\Api\Http\Middleware\Request

Afficher le fichier Open project: dingo/api Class Usage Examples

Protected Properties

Свойство Type Description
$app Illuminate\Contracts\Foundation\Application Application instance.
$events Illuminate\Events\Dispatcher Event dispatcher instance.
$exception Dingo\Api\Contract\Debug\ExceptionHandler Exception handler instance.
$middleware array Array of middleware.
$router Dingo\Api\Routing\Router Router instance.
$validator Dingo\Api\Http\Validator HTTP validator instance.

Méthodes publiques

Méthode Description
__construct ( Illuminate\Contracts\Container\Container $app, Dingo\Api\Contract\Debug\ExceptionHandler $exception, Router $router, RequestValidator $validator, Illuminate\Events\Dispatcher $events ) : void Create a new request middleware instance.
handle ( Illuminate\Http\Request $request, Closure $next ) : mixed Handle an incoming request.
mergeMiddlewares ( array $middleware ) : void Merge new middlewares onto the existing middlewares.
setMiddlewares ( array $middleware ) : void Set the middlewares.
terminate ( $request, $response ) : void Call the terminate method on middlewares.

Méthodes protégées

Méthode Description
gatherRouteMiddlewares ( Dingo\Api\Http\Request $request ) : array Gather the middlewares for the route.
parseMiddleware ( string $middleware ) : array Parse a middleware string to get the name and parameters.
sendRequestThroughRouter ( Dingo\Api\Http\Request $request ) : Response Send the request through the Dingo router.

Method Details

__construct() public méthode

Create a new request middleware instance.
public __construct ( Illuminate\Contracts\Container\Container $app, Dingo\Api\Contract\Debug\ExceptionHandler $exception, Router $router, RequestValidator $validator, Illuminate\Events\Dispatcher $events ) : void
$app Illuminate\Contracts\Container\Container
$exception Dingo\Api\Contract\Debug\ExceptionHandler
$router Dingo\Api\Routing\Router
$validator Dingo\Api\Http\RequestValidator
$events Illuminate\Events\Dispatcher
Résultat void

gatherRouteMiddlewares() protected méthode

Gather the middlewares for the route.
protected gatherRouteMiddlewares ( Dingo\Api\Http\Request $request ) : array
$request Dingo\Api\Http\Request
Résultat array

handle() public méthode

Handle an incoming request.
public handle ( Illuminate\Http\Request $request, Closure $next ) : mixed
$request Illuminate\Http\Request
$next Closure
Résultat mixed

mergeMiddlewares() public méthode

Merge new middlewares onto the existing middlewares.
public mergeMiddlewares ( array $middleware ) : void
$middleware array
Résultat void

parseMiddleware() protected méthode

Parse a middleware string to get the name and parameters.
Author: Taylor Otwell
protected parseMiddleware ( string $middleware ) : array
$middleware string
Résultat array

sendRequestThroughRouter() protected méthode

Send the request through the Dingo router.
protected sendRequestThroughRouter ( Dingo\Api\Http\Request $request ) : Response
$request Dingo\Api\Http\Request
Résultat Dingo\Api\Http\Response

setMiddlewares() public méthode

Set the middlewares.
public setMiddlewares ( array $middleware ) : void
$middleware array
Résultat void

terminate() public méthode

Call the terminate method on middlewares.
public terminate ( $request, $response ) : void
Résultat void

Property Details

$app protected_oe property

Application instance.
protected Application,Illuminate\Contracts\Foundation $app
Résultat Illuminate\Contracts\Foundation\Application

$events protected_oe property

Event dispatcher instance.
protected Dispatcher,Illuminate\Events $events
Résultat Illuminate\Events\Dispatcher

$exception protected_oe property

Exception handler instance.
protected ExceptionHandler,Dingo\Api\Contract\Debug $exception
Résultat Dingo\Api\Contract\Debug\ExceptionHandler

$middleware protected_oe property

Array of middleware.
protected array $middleware
Résultat array

$router protected_oe property

Router instance.
protected Router,Dingo\Api\Routing $router
Résultat Dingo\Api\Routing\Router

$validator protected_oe property

HTTP validator instance.
protected Validator,Dingo\Api\Http $validator
Résultat Dingo\Api\Http\Validator