Commit 34dc150f by Qiang Xue

doc fixes.

parent bee82b29
......@@ -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 <qiang.xue@gmail.com>
......
......@@ -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 <qiang.xue@gmail.com>
* @since 2.0
......
......@@ -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 <qiang.xue@gmail.com>
* @since 2.0
......
......@@ -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]].
*
......
......@@ -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 <qiang.xue@gmail.com>
* @since 2.0
......
......@@ -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);
}
/**
......
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\web;
use yii\base\Event;
/**
* ResponseEvent represents the event data for the [[Application::EVENT_RESPONSE]] event.
*
* Event handlers can modify the content in [[response]] or replace [[response]]
* with a new response object. The updated or new response will
* be used as the final out of the application.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @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);
}
}
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