Browse Source

doc fixes.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
34dc150f63
  1. 2
      framework/yii/BaseYii.php
  2. 4
      framework/yii/Yii.php
  3. 2
      framework/yii/console/Response.php
  4. 2
      framework/yii/data/ActiveDataProvider.php
  5. 2
      framework/yii/i18n/MissingTranslationEvent.php
  6. 6
      framework/yii/web/Response.php
  7. 39
      framework/yii/web/ResponseEvent.php

2
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. * 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. * you can customize methods of BaseYii.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>

4
framework/yii/Yii.php

@ -12,8 +12,8 @@ require(__DIR__ . '/BaseYii.php');
/** /**
* Yii is a helper class serving common framework functionalities. * Yii is a helper class serving common framework functionalities.
* *
* It extends from [[BaseYii]] which provides the actual implementation. * It extends from [[yii\BaseYii]] which provides the actual implementation.
* By writing your own Yii class, you can customize some functionalities of [[BaseYii]]. * By writing your own Yii class, you can customize some functionalities of [[yii\BaseYii]].
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0

2
framework/yii/console/Response.php

@ -8,7 +8,7 @@
namespace yii\console; 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> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0

2
framework/yii/data/ActiveDataProvider.php

@ -15,7 +15,7 @@ use yii\db\Connection;
use yii\db\QueryInterface; 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]]. * ActiveDataProvider provides data by performing DB queries using [[query]].
* *

2
framework/yii/i18n/MissingTranslationEvent.php

@ -10,7 +10,7 @@ namespace yii\i18n;
use yii\base\Event; 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> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0

6
framework/yii/web/Response.php

@ -281,12 +281,12 @@ class Response extends \yii\base\Response
*/ */
public function send() public function send()
{ {
$this->trigger(self::EVENT_BEFORE_SEND, new ResponseEvent($this)); $this->trigger(self::EVENT_BEFORE_SEND);
$this->prepare(); $this->prepare();
$this->trigger(self::EVENT_AFTER_PREPARE, new ResponseEvent($this)); $this->trigger(self::EVENT_AFTER_PREPARE);
$this->sendHeaders(); $this->sendHeaders();
$this->sendContent(); $this->sendContent();
$this->trigger(self::EVENT_AFTER_SEND, new ResponseEvent($this)); $this->trigger(self::EVENT_AFTER_SEND);
} }
/** /**

39
framework/yii/web/ResponseEvent.php

@ -1,39 +0,0 @@
<?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);
}
}
Loading…
Cancel
Save