Commit 4a543317 by Carsten Brandt

Merge branch 'master' of github.com:yiisoft/yii2

* 'master' of github.com:yiisoft/yii2: doc fix Fixes #1134: doc fix.
parents a0b0d42b e8da628d
...@@ -321,18 +321,12 @@ class BaseYii ...@@ -321,18 +321,12 @@ class BaseYii
* the rest of the name-value pairs in the array will be used to initialize * the rest of the name-value pairs in the array will be used to initialize
* the corresponding object properties. * the corresponding object properties.
* *
* The object type can be either a class name or the [[getAlias()|alias]] of
* the class. For example,
*
* - `app\components\GoogleMap`: fully-qualified namespaced class.
* - `@app/components/GoogleMap`: an alias, used for non-namespaced class.
*
* Below are some usage examples: * Below are some usage examples:
* *
* ~~~ * ~~~
* $object = \Yii::createObject('@app/components/GoogleMap'); * $object = \Yii::createObject('app\components\GoogleMap');
* $object = \Yii::createObject([ * $object = \Yii::createObject([
* 'class' => '\app\components\GoogleMap', * 'class' => 'app\components\GoogleMap',
* 'apiKey' => 'xyz', * 'apiKey' => 'xyz',
* ]); * ]);
* ~~~ * ~~~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment