From 36c28bee4f5ff4add6545ffa7823d8efe994147f Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 13 Nov 2013 08:28:55 -0500 Subject: [PATCH] Fixes #1191 --- docs/guide/upgrade-from-v1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/upgrade-from-v1.md b/docs/guide/upgrade-from-v1.md index 2bf080a..e79259c 100644 --- a/docs/guide/upgrade-from-v1.md +++ b/docs/guide/upgrade-from-v1.md @@ -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.'); }); ```