ControllerDispatcher
class ControllerDispatcher (View source)
Traits
RouteDependencyResolverTrait |
Properties
protected Router | $router | The router instance. | |
protected Container | $container | The IoC container instance. |
Methods
mixed | callWithDependencies(object $instance, string $method) Call a class method with the resolved dependencies. | from RouteDependencyResolverTrait |
array | resolveClassMethodDependencies(array $parameters, object $instance, string $method) Resolve the object method's type-hinted dependencies. | from RouteDependencyResolverTrait |
array | resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $reflector) Resolve the given method's type-hinted dependencies. | from RouteDependencyResolverTrait |
mixed | transformDependency(ReflectionParameter $parameter, array $parameters, array $originalParameters) Attempt to transform the given parameter into a class instance. | from RouteDependencyResolverTrait |
bool | vacantEloquentParameter(ReflectionClass $class, array $parameters) Determine if the given type-hinted class is an implict Eloquent binding. | from RouteDependencyResolverTrait |
mixed | extractModelIdentifier(ReflectionParameter $parameter, array $originalParameters) Extract an implicit model binding's key out of the parameter list. | from RouteDependencyResolverTrait |
bool | alreadyInParameters(string $class, array $parameters) Determine if an object of the given class is in a list of parameters. | from RouteDependencyResolverTrait |
void | spliceIntoParameters(array $parameters, string $key, mixed $instance) Splice the given value into the parameter list. | from RouteDependencyResolverTrait |
void | __construct(Router $router, 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 | callWithinStack(Controller $instance, Route $route, Request $request, string $method) Call the given controller instance method. | |
array | getMiddleware(Controller $instance, string $method) Get the middleware for the controller instance. | |
bool | methodExcludedByOptions(string $method, array $options) Determine if the given options exclude a particular method. | |
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 | filterFailsMethod(array $filter, Request $request, string $method) Determine if the filter fails the method constraints. | |
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
protected mixed callWithDependencies(object $instance, string $method)
Call a class method with the resolved dependencies.
protected array resolveClassMethodDependencies(array $parameters, object $instance, string $method)
Resolve the object method's type-hinted dependencies.
array resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $reflector)
Resolve the given method's type-hinted dependencies.
protected mixed transformDependency(ReflectionParameter $parameter, array $parameters, array $originalParameters)
Attempt to transform the given parameter into a class instance.
protected bool vacantEloquentParameter(ReflectionClass $class, array $parameters)
Determine if the given type-hinted class is an implict Eloquent binding.
Must not already be resolved in the parameter list by an explicit model binding.
protected mixed extractModelIdentifier(ReflectionParameter $parameter, array $originalParameters)
Extract an implicit model binding's key out of the parameter list.
protected bool alreadyInParameters(string $class, array $parameters)
Determine if an object of the given class is in a list of parameters.
protected void spliceIntoParameters(array $parameters, string $key, mixed $instance)
Splice the given value into the parameter list.
void __construct(Router $router, 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 callWithinStack(Controller $instance, Route $route, Request $request, string $method)
Call the given controller instance method.
protected array getMiddleware(Controller $instance, string $method)
Get the middleware for the controller instance.
bool methodExcludedByOptions(string $method, array $options)
Determine if the given options exclude a particular method.
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 filterFailsMethod(array $filter, Request $request, string $method)
Determine if the filter fails the method constraints.
protected bool filterFailsOn(array $filter, Request $request, string $method)
Determine if the filter fails the "on" constraint.
protected mixed callFilter(array $filter, Route $route, Request $request)
Call the given controller filter method.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Routing/ControllerDispatcher.html