PHP Трейт Laravel\Lumen\Concerns\RoutesRequests

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$namedRoutes array All of the named routes and URI pairs.

Защищенные свойства (Protected)

Свойство Тип Описание
$currentRoute array The current route being dispatched.
$dispatcher FastRoute\Dispatcher The FastRoute dispatcher.
$groupAttributes array | null The shared attributes for the current route group.
$middleware array All of the global middleware for the application.
$routeMiddleware array All of the route specific middleware short-hands.
$routes array All of the routes waiting to be registered.

Открытые методы

Метод Описание
addRoute ( array | string $method, string $uri, mixed $action ) : void Add a route to the collection.
delete ( string $uri, mixed $action ) Register a route with the application.
dispatch ( Request | null $request = null ) : Illuminate\Http\Response Dispatch the incoming request.
get ( string $uri, mixed $action ) Register a route with the application.
getRoutes ( ) : array Get the raw routes for the application.
group ( array $attributes, Closure $callback ) : void Register a set of routes with a set of shared attributes.
handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true )
middleware ( Closur\Closure | array $middleware ) Add new middleware to the application.
options ( string $uri, mixed $action ) Register a route with the application.
patch ( string $uri, mixed $action ) Register a route with the application.
post ( string $uri, mixed $action ) Register a route with the application.
prepareResponse ( mixed $response ) : Illuminate\Http\Response Prepare the response for sending.
put ( string $uri, mixed $action ) Register a route with the application.
routeMiddleware ( array $middleware ) Define the route middleware for the application.
run ( Request | null $request = null ) : void Run the application and send the response.
setDispatcher ( FastRoute\Dispatcher $dispatcher ) : void Set the FastRoute dispatcher instance.

Защищенные методы

Метод Описание
callActionOnArrayBasedRoute ( array $routeInfo ) : mixed Call the Closure on the array based route.
callControllerAction ( array $routeInfo ) : mixed Call a controller based route.
callControllerCallable ( callable $callable, array $parameters = [] ) : Illuminate\Http\Response Call a controller callable and return the response.
callLumenController ( mixed $instance, string $method, array $routeInfo ) : mixed Send the request through a Lumen controller.
callLumenControllerWithMiddleware ( mixed $instance, string $method, array $routeInfo, array $middleware ) : mixed Send the request through a set of controller middleware.
callTerminableMiddleware ( mixed $response ) : void Call the terminable middleware.
createDispatcher ( ) : FastRoute\Dispatcher Create a FastRoute dispatcher instance for the application.
gatherMiddlewareClassNames ( string $middleware ) : array Gather the full class names for the middleware short-cut string.
getMethod ( ) : string Get the current HTTP request method.
getPathInfo ( ) : string Get the current HTTP path info.
handleDispatcherResponse ( array $routeInfo ) : mixed Handle the response from the FastRoute dispatcher.
handleFoundRoute ( array $routeInfo ) : mixed Handle a route found by the dispatcher.
mergeGroupAttributes ( array $action ) : array Merge the group attributes into the action.
mergeMiddlewareGroup ( array $action ) : array Merge the middleware group into the action.
mergeNamespaceGroup ( array $action ) : array Merge the namespace group into the action.
parseAction ( mixed $action ) : array Parse the action into an array format.
parseIncomingRequest ( Illuminate\Http\Request | null $request ) : array Parse the incoming request and return the method and path info.
sendThroughPipeline ( array $middleware, Closure $then ) : mixed Send the request through the pipeline with the given callback.
shouldSkipMiddleware ( ) : boolean Determines whether middleware should be skipped during request.

Описание методов

addRoute() публичный Метод

Add a route to the collection.
public addRoute ( array | string $method, string $uri, mixed $action ) : void
$method array | string
$uri string
$action mixed
Результат void

callActionOnArrayBasedRoute() защищенный Метод

Call the Closure on the array based route.
protected callActionOnArrayBasedRoute ( array $routeInfo ) : mixed
$routeInfo array
Результат mixed

callControllerAction() защищенный Метод

Call a controller based route.
protected callControllerAction ( array $routeInfo ) : mixed
$routeInfo array
Результат mixed

callControllerCallable() защищенный Метод

Call a controller callable and return the response.
protected callControllerCallable ( callable $callable, array $parameters = [] ) : Illuminate\Http\Response
$callable callable
$parameters array
Результат Illuminate\Http\Response

callLumenController() защищенный Метод

Send the request through a Lumen controller.
protected callLumenController ( mixed $instance, string $method, array $routeInfo ) : mixed
$instance mixed
$method string
$routeInfo array
Результат mixed

callLumenControllerWithMiddleware() защищенный Метод

Send the request through a set of controller middleware.
protected callLumenControllerWithMiddleware ( mixed $instance, string $method, array $routeInfo, array $middleware ) : mixed
$instance mixed
$method string
$routeInfo array
$middleware array
Результат mixed

callTerminableMiddleware() защищенный Метод

Call the terminable middleware.
protected callTerminableMiddleware ( mixed $response ) : void
$response mixed
Результат void

createDispatcher() защищенный Метод

Create a FastRoute dispatcher instance for the application.
protected createDispatcher ( ) : FastRoute\Dispatcher
Результат FastRoute\Dispatcher

delete() публичный Метод

Register a route with the application.
public delete ( string $uri, mixed $action )
$uri string
$action mixed

dispatch() публичный Метод

Dispatch the incoming request.
public dispatch ( Request | null $request = null ) : Illuminate\Http\Response
$request Symfony\Component\HttpFoundation\Request | null
Результат Illuminate\Http\Response

gatherMiddlewareClassNames() защищенный Метод

Gather the full class names for the middleware short-cut string.
protected gatherMiddlewareClassNames ( string $middleware ) : array
$middleware string
Результат array

get() публичный Метод

Register a route with the application.
public get ( string $uri, mixed $action )
$uri string
$action mixed

getMethod() защищенный Метод

Get the current HTTP request method.
protected getMethod ( ) : string
Результат string

getPathInfo() защищенный Метод

Get the current HTTP path info.
protected getPathInfo ( ) : string
Результат string

getRoutes() публичный Метод

Get the raw routes for the application.
public getRoutes ( ) : array
Результат array

group() публичный Метод

Register a set of routes with a set of shared attributes.
public group ( array $attributes, Closure $callback ) : void
$attributes array
$callback Closure
Результат void

handle() публичный Метод

public handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true )
$request Symfony\Component\HttpFoundation\Request

handleDispatcherResponse() защищенный Метод

Handle the response from the FastRoute dispatcher.
protected handleDispatcherResponse ( array $routeInfo ) : mixed
$routeInfo array
Результат mixed

handleFoundRoute() защищенный Метод

Handle a route found by the dispatcher.
protected handleFoundRoute ( array $routeInfo ) : mixed
$routeInfo array
Результат mixed

mergeGroupAttributes() защищенный Метод

Merge the group attributes into the action.
protected mergeGroupAttributes ( array $action ) : array
$action array
Результат array

mergeMiddlewareGroup() защищенный Метод

Merge the middleware group into the action.
protected mergeMiddlewareGroup ( array $action ) : array
$action array
Результат array

mergeNamespaceGroup() защищенный Метод

Merge the namespace group into the action.
protected mergeNamespaceGroup ( array $action ) : array
$action array
Результат array

middleware() публичный Метод

Add new middleware to the application.
public middleware ( Closur\Closure | array $middleware )
$middleware Closur\Closure | array

options() публичный Метод

Register a route with the application.
public options ( string $uri, mixed $action )
$uri string
$action mixed

parseAction() защищенный Метод

Parse the action into an array format.
protected parseAction ( mixed $action ) : array
$action mixed
Результат array

parseIncomingRequest() защищенный Метод

Parse the incoming request and return the method and path info.
protected parseIncomingRequest ( Illuminate\Http\Request | null $request ) : array
$request Illuminate\Http\Request | null
Результат array

patch() публичный Метод

Register a route with the application.
public patch ( string $uri, mixed $action )
$uri string
$action mixed

post() публичный Метод

Register a route with the application.
public post ( string $uri, mixed $action )
$uri string
$action mixed

prepareResponse() публичный Метод

Prepare the response for sending.
public prepareResponse ( mixed $response ) : Illuminate\Http\Response
$response mixed
Результат Illuminate\Http\Response

put() публичный Метод

Register a route with the application.
public put ( string $uri, mixed $action )
$uri string
$action mixed

routeMiddleware() публичный Метод

Define the route middleware for the application.
public routeMiddleware ( array $middleware )
$middleware array

run() публичный Метод

Run the application and send the response.
public run ( Request | null $request = null ) : void
$request Symfony\Component\HttpFoundation\Request | null
Результат void

sendThroughPipeline() защищенный Метод

Send the request through the pipeline with the given callback.
protected sendThroughPipeline ( array $middleware, Closure $then ) : mixed
$middleware array
$then Closure
Результат mixed

setDispatcher() публичный Метод

Set the FastRoute dispatcher instance.
public setDispatcher ( FastRoute\Dispatcher $dispatcher ) : void
$dispatcher FastRoute\Dispatcher
Результат void

shouldSkipMiddleware() защищенный Метод

Determines whether middleware should be skipped during request.
protected shouldSkipMiddleware ( ) : boolean
Результат boolean

Описание свойств

$currentRoute защищенное свойство

The current route being dispatched.
protected array $currentRoute
Результат array

$dispatcher защищенное свойство

The FastRoute dispatcher.
protected Dispatcher,FastRoute $dispatcher
Результат FastRoute\Dispatcher

$groupAttributes защищенное свойство

The shared attributes for the current route group.
protected array|null $groupAttributes
Результат array | null

$middleware защищенное свойство

All of the global middleware for the application.
protected array $middleware
Результат array

$namedRoutes публичное свойство

All of the named routes and URI pairs.
public array $namedRoutes
Результат array

$routeMiddleware защищенное свойство

All of the route specific middleware short-hands.
protected array $routeMiddleware
Результат array

$routes защищенное свойство

All of the routes waiting to be registered.
protected array $routes
Результат array