ArgumentsResolver
class ArgumentsResolver implements ArgumentsResolverInterface (View source)
Resolves the arguments to pass to a callable.
Properties
| protected array | $scalars | An associative array of parameter names to scalar candidate values. |
|
| protected array | $objects | An associative array of parameter names to object candidate values. |
|
| protected array | $wildcards | An array object candidates tried on every parameter regardless of name. |
Methods
Constructs a new ArgumentsResolver.
Gets arguments suitable for passing to the given callable.
Gets a reflector for the access check callable.
Handles unresolved arguments for getArgument().
Details
__construct(array $scalars, array $objects, array $wildcards)
Constructs a new ArgumentsResolver.
array
getArguments(callable $callable)
Gets arguments suitable for passing to the given callable.
protected mixed
getArgument(ReflectionParameter $parameter)
Gets the argument value for a parameter.
protected ReflectionFunctionAbstract
getReflector(callable $callable)
Gets a reflector for the access check callable.
The access checker may be either a procedural function (in which case the callable is the function name) or a method (in which case the callable is an array of the object and method name).
protected
handleUnresolvedArgument(ReflectionParameter $parameter)
Handles unresolved arguments for getArgument().
Subclasses that override this method may return a default value instead of throwing an exception.