invoke() public method (available since version 2.0.7)
Invoke a callback with resolving dependencies in parameters. This methods allows invoking a callback and let type hinted parameter names to be resolved as objects of the Container. It additionally allow calling function using named parameters. For example, the following callback may be invoked using the Container to resolve the formatter dependency: $formatString = function($string, \yii\i18n\Formatter $formatter) {
// ...
}
Yii::$co