ControllerDispatcher
class ControllerDispatcher (View source)
Properties
protected RouteFiltererInterface | $filterer | The routing filterer implementation. |
|
protected Container | $container | The IoC container instance. |
Methods
Create a new controller dispatcher instance.
Make a controller instance via the IoC container.
Call the "before" filters for the controller.
Apply the applicable after filters to the route.
Determine if the given filter applies to the request.
Determine if the filter fails the "only" constraint.
Determine if the filter fails the "except" constraint.
Determine if the filter fails the "on" constraint.
Details
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.
protected mixed
makeController(string $controller)
Make a controller instance via the IoC container.
protected mixed
call(Controller $instance, Route $route, string $method)
Call the given controller instance method.
protected mixed
before(Controller $instance, Route $route, Request $request, string $method)
Call the "before" filters for the controller.
protected mixed
assignAfter(Controller $instance, Route $route, Request $request, string $method)
Apply the applicable after filters to the route.
protected string
getAssignableAfter(Closure|string $filter)
Get the assignable after filter for the route.
protected bool
filterApplies(array $filter, Request $request, string $method)
Determine if the given filter applies to the request.
protected bool
filterFailsOnly(array $filter, Request $request, string $method)
Determine if the filter fails the "only" constraint.
protected bool
filterFailsExcept(array $filter, Request $request, string $method)
Determine if the filter fails the "except" constraint.
protected bool
filterFailsOn(array $filter, Request $request, string $method)
Determine if the filter fails the "on" constraint.