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:
php
$formatString = function($string, \yii\i18n\Formatter $formatter) {
...
}
Yii::$container->invoke($formatString, ['string' => 'Hello World!']);
This will pass the string 'Hello World!' as the first param, and a formatter instance created
by the DI container as the second param to the callable.