RouteDependencyResolverTrait
trait RouteDependencyResolverTrait (View source)
Methods
mixed | callWithDependencies(object $instance, string $method) Call a class method with the resolved dependencies. | |
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. | |
mixed | transformDependency(ReflectionParameter $parameter, array $parameters, array $originalParameters) Attempt to transform the given parameter into a class instance. | |
bool | vacantEloquentParameter(ReflectionClass $class, array $parameters) Determine if the given type-hinted class is an implict Eloquent binding. | |
mixed | extractModelIdentifier(ReflectionParameter $parameter, array $originalParameters) Extract an implicit model binding's key out of the parameter list. | |
bool | alreadyInParameters(string $class, array $parameters) Determine if an object of the given class is in a list of parameters. | |
void | spliceIntoParameters(array $parameters, string $key, mixed $instance) Splice the given value into the parameter list. |
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Routing/RouteDependencyResolverTrait.html