Commit 2509748f by Qiang Xue

Fixes #1134: doc fix.

parent 2faf6bb1
......@@ -321,18 +321,12 @@ class BaseYii
* the rest of the name-value pairs in the array will be used to initialize
* 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:
*
* ~~~
* $object = \Yii::createObject('@app/components/GoogleMap');
* $object = \Yii::createObject([
* 'class' => '\app\components\GoogleMap',
* 'class' => 'app\components\GoogleMap',
* '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