di\Container resolveCallableDependencies()

resolveCallableDependencies() public method (available since version 2.0.7)

Resolve dependencies for a function.

This method can be used to implement similar functionality as provided by invoke() in other components.

public array resolveCallableDependencies ( callable $callback, $params = [] )
$callback callable

Callable to be invoked.

$params array

The array of parameters for the function, can be either numeric or associative.

return array

The resolved dependencies.

throws yii\base\InvalidConfigException

if a dependency cannot be resolved or if a dependency cannot be fulfilled.

throws yii\di\NotInstantiableException

If resolved to an abstract class or an interface (since 2.0.9)

doc_Yii
2016-10-30 17:01:06
Comments
Leave a Comment

Please login to continue.