Commit 36c28bee by Qiang Xue

Fixes #1191

parent da93d9b4
......@@ -38,7 +38,7 @@ of `Object` should declare its constructor (if needed) in the following way so t
it can be properly configured:
```php
class MyClass extends \yii\Object
class MyClass extends \yii\base\Object
{
public function __construct($param1, $param2, $config = [])
{
......@@ -109,7 +109,7 @@ Yii::$app->trigger($eventName);
If you need to handle all instances of a class instead of the object you can attach a handler like the following:
```php
Event::on([ActiveRecord::className(), ActiveRecord::EVENT_AFTER_INSERT], function ($event) {
Event::on(ActiveRecord::className(), ActiveRecord::EVENT_AFTER_INSERT, function ($event) {
Yii::trace(get_class($event->sender) . ' is inserted.');
});
```
......
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