build() protected method
Creates an instance of the specified class.
This method will resolve dependencies of the specified class, instantiate them, and inject them into the new instance of the specified class.
protected object build ( $class, $params, $config ) | ||
---|---|---|
$class | string |
The class name |
$params | array |
Constructor parameters |
$config | array |
Configurations to be applied to the new instance |
return | object |
The newly created instance of the specified class |
throws | yii\di\NotInstantiableException |
If resolved to an abstract class or an interface (since 2.0.9) |
Please login to continue.