Interface CallableInvokerInterface
Callable invoker interface.
Type-hint against this interface if you only require to invoke callables via
the container. The ContainerInterface extends this interface.
Methods summary
public
mixed
|
#
invoke( callable $callable, array $params = array() )
Execute a function, closure or class method, resolving type-hinted
arguments as necessary.
Execute a function, closure or class method, resolving type-hinted
arguments as necessary.
Callable can be anything that passes is_callable() in PHP, including an
array of ['ClassName', 'method'], in which case the class will first be
resolved from the container. Callable can also be some things that don't
pass is_callable(), for example ['InterfaceName', 'method'], but only if
'InterfaceName' is bound to the container somehow.
Parameters
- $callable
- $params
- See ContainerInterface::params()
Returns
mixed
|