ResponseEvent.php 1001 Bytes
Newer Older
1 2 3 4 5 6 7
<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

8 9 10
namespace yii\web;

use yii\base\Event;
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

/**
 * 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.
	 */
Alexander Makarov committed
34
	public function __construct($response, $config = [])
35 36 37 38 39
	{
		$this->response = $response;
		parent::__construct($config);
	}
}