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 | 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. |
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 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.
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Routing/ControllerDispatcher.html