From 34dc150f63d774775f712fed509116082bbff680 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Mon, 6 Jan 2014 20:51:43 -0500 Subject: [PATCH] doc fixes. --- framework/yii/BaseYii.php | 2 +- framework/yii/Yii.php | 4 +-- framework/yii/console/Response.php | 2 +- framework/yii/data/ActiveDataProvider.php | 2 +- framework/yii/i18n/MissingTranslationEvent.php | 2 +- framework/yii/web/Response.php | 6 ++-- framework/yii/web/ResponseEvent.php | 39 -------------------------- 7 files changed, 9 insertions(+), 48 deletions(-) delete mode 100644 framework/yii/web/ResponseEvent.php diff --git a/framework/yii/BaseYii.php b/framework/yii/BaseYii.php index 5274a3b..b8af607 100644 --- a/framework/yii/BaseYii.php +++ b/framework/yii/BaseYii.php @@ -50,7 +50,7 @@ defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER', true); /** * BaseYii is the core helper class for the Yii framework. * - * Do not use BaseYii directly. Instead, use its child class [[Yii]] where + * Do not use BaseYii directly. Instead, use its child class [[\Yii]] where * you can customize methods of BaseYii. * * @author Qiang Xue diff --git a/framework/yii/Yii.php b/framework/yii/Yii.php index 272b35f..b095c17 100644 --- a/framework/yii/Yii.php +++ b/framework/yii/Yii.php @@ -12,8 +12,8 @@ require(__DIR__ . '/BaseYii.php'); /** * Yii is a helper class serving common framework functionalities. * - * It extends from [[BaseYii]] which provides the actual implementation. - * By writing your own Yii class, you can customize some functionalities of [[BaseYii]]. + * It extends from [[yii\BaseYii]] which provides the actual implementation. + * By writing your own Yii class, you can customize some functionalities of [[yii\BaseYii]]. * * @author Qiang Xue * @since 2.0 diff --git a/framework/yii/console/Response.php b/framework/yii/console/Response.php index f6e6dd0..eff85c6 100644 --- a/framework/yii/console/Response.php +++ b/framework/yii/console/Response.php @@ -8,7 +8,7 @@ namespace yii\console; /** - * The console Response represents the result of a console application by holding the [[exitCode]]. + * The console Response represents the result of a console application. * * @author Qiang Xue * @since 2.0 diff --git a/framework/yii/data/ActiveDataProvider.php b/framework/yii/data/ActiveDataProvider.php index 2292286..d3e3b56 100644 --- a/framework/yii/data/ActiveDataProvider.php +++ b/framework/yii/data/ActiveDataProvider.php @@ -15,7 +15,7 @@ use yii\db\Connection; use yii\db\QueryInterface; /** - * ActiveDataProvider implements a data provider based on [[Query]] and [[ActiveQuery]]. + * ActiveDataProvider implements a data provider based on [[\yii\db\Query]] and [[\yii\db\ActiveQuery]]. * * ActiveDataProvider provides data by performing DB queries using [[query]]. * diff --git a/framework/yii/i18n/MissingTranslationEvent.php b/framework/yii/i18n/MissingTranslationEvent.php index 5c8ffd3..7a22d48 100644 --- a/framework/yii/i18n/MissingTranslationEvent.php +++ b/framework/yii/i18n/MissingTranslationEvent.php @@ -10,7 +10,7 @@ namespace yii\i18n; use yii\base\Event; /** - * MissingTranslationEvent represents the parameter for the [[MessageSource::missingTranslation]] event. + * MissingTranslationEvent represents the parameter for the [[MessageSource::EVENT_MISSING_TRANSLATION]] event. * * @author Qiang Xue * @since 2.0 diff --git a/framework/yii/web/Response.php b/framework/yii/web/Response.php index 9d8f523..fcc0629 100644 --- a/framework/yii/web/Response.php +++ b/framework/yii/web/Response.php @@ -281,12 +281,12 @@ class Response extends \yii\base\Response */ public function send() { - $this->trigger(self::EVENT_BEFORE_SEND, new ResponseEvent($this)); + $this->trigger(self::EVENT_BEFORE_SEND); $this->prepare(); - $this->trigger(self::EVENT_AFTER_PREPARE, new ResponseEvent($this)); + $this->trigger(self::EVENT_AFTER_PREPARE); $this->sendHeaders(); $this->sendContent(); - $this->trigger(self::EVENT_AFTER_SEND, new ResponseEvent($this)); + $this->trigger(self::EVENT_AFTER_SEND); } /** diff --git a/framework/yii/web/ResponseEvent.php b/framework/yii/web/ResponseEvent.php deleted file mode 100644 index dabaf2f..0000000 --- a/framework/yii/web/ResponseEvent.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @since 2.0 - */ -class ResponseEvent extends Event -{ - /** - * @var Response the response object associated with this event. - */ - public $response; - - /** - * Constructor. - * @param Response $response the response object associated with this event. - * @param array $config the configuration array for initializing the newly created object. - */ - public function __construct($response, $config = []) - { - $this->response = $response; - parent::__construct($config); - } -}