ControllerDispatcher

class ControllerDispatcher (View source)

Properties

protected RouteFiltererInterface $filterer The routing filterer implementation.
protected Container $container The IoC container instance.

Methods

void __construct(RouteFiltererInterface $filterer, Container $container = null)

Create a new controller dispatcher instance.

mixed dispatch(Route $route, Request $request, string $controller, string $method)

Dispatch a request to a given controller and method.

mixed makeController(string $controller)

Make a controller instance via the IoC container.

mixed call(Controller $instance, Route $route, string $method)

Call the given controller instance method.

mixed before(Controller $instance, Route $route, Request $request, string $method)

Call the "before" filters for the controller.

mixed assignAfter(Controller $instance, Route $route, Request $request, string $method)

Apply the applicable after filters to the route.

string getAssignableAfter(Closure|string $filter)

Get the assignable after filter for the route.

bool filterApplies(array $filter, Request $request, string $method)

Determine if the given filter applies to the request.

bool filterFailsOnly(array $filter, Request $request, string $method)

Determine if the filter fails the "only" constraint.

bool filterFailsExcept(array $filter, Request $request, string $method)

Determine if the filter fails the "except" constraint.

bool filterFailsOn(array $filter, Request $request, string $method)

Determine if the filter fails the "on" constraint.

mixed callFilter(array $filter, Route $route, Request $request)

Call the given controller filter method.

Details

void __construct(RouteFiltererInterface $filterer, Container $container = null)

Create a new controller dispatcher instance.

Parameters

RouteFiltererInterface $filterer
Container $container

Return Value

void

mixed dispatch(Route $route, Request $request, string $controller, string $method)

Dispatch a request to a given controller and method.

Parameters

Route $route
Request $request
string $controller
string $method

Return Value

mixed

protected mixed makeController(string $controller)

Make a controller instance via the IoC container.

Parameters

string $controller

Return Value

mixed

protected mixed call(Controller $instance, Route $route, string $method)

Call the given controller instance method.

Parameters

Controller $instance
Route $route
string $method

Return Value

mixed

protected mixed before(Controller $instance, Route $route, Request $request, string $method)

Call the "before" filters for the controller.

Parameters

Controller $instance
Route $route
Request $request
string $method

Return Value

mixed

protected mixed assignAfter(Controller $instance, Route $route, Request $request, string $method)

Apply the applicable after filters to the route.

Parameters

Controller $instance
Route $route
Request $request
string $method

Return Value

mixed

protected string getAssignableAfter(Closure|string $filter)

Get the assignable after filter for the route.

Parameters

Closure|string $filter

Return Value

string

protected bool filterApplies(array $filter, Request $request, string $method)

Determine if the given filter applies to the request.

Parameters

array $filter
Request $request
string $method

Return Value

bool

protected bool filterFailsOnly(array $filter, Request $request, string $method)

Determine if the filter fails the "only" constraint.

Parameters

array $filter
Request $request
string $method

Return Value

bool

protected bool filterFailsExcept(array $filter, Request $request, string $method)

Determine if the filter fails the "except" constraint.

Parameters

array $filter
Request $request
string $method

Return Value

bool

protected bool filterFailsOn(array $filter, Request $request, string $method)

Determine if the filter fails the "on" constraint.

Parameters

array $filter
Request $request
string $method

Return Value

bool

protected mixed callFilter(array $filter, Route $route, Request $request)

Call the given controller filter method.

Parameters

array $filter
Route $route
Request $request

Return Value

mixed

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Routing/ControllerDispatcher.html