di\Container build()

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)

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

Please login to continue.