Yii2 Bootstrap 3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

14 years ago
<?php
13 years ago
/**
* Event class file.
*
* @link http://www.yiiframework.com/
* @copyright Copyright &copy; 2008-2012 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
14 years ago
namespace yii\base;
/**
13 years ago
* Event is the base class for all event classes.
14 years ago
*
* It encapsulates the parameters associated with an event.
13 years ago
* The [[sender]] property describes who raises the event.
* And the [[handled]] property indicates if the event is handled.
* If an event handler sets [[handled]] to be true, the rest of the
13 years ago
* uninvoked handlers will no longer be called to handle the event.
* Additionally, an event may specify extra parameters via the [[params]] property.
14 years ago
*
* @author Qiang Xue <qiang.xue@gmail.com>
13 years ago
* @since 2.0
14 years ago
*/
13 years ago
class Event extends Component
14 years ago
{
/**
* @var object the sender of this event
*/
public $sender;
/**
* @var boolean whether the event is handled. Defaults to false.
13 years ago
* When a handler sets this to be true, the rest of the uninvoked event handlers will be canceled.
14 years ago
*/
public $handled = false;
13 years ago
/**
* @var mixed extra parameters associated with the event.
*/
public $params;
14 years ago
/**
* Constructor.
* @param mixed $sender sender of the event
*/
13 years ago
public function __construct($sender=null, $params=null)
14 years ago
{
13 years ago
$this->sender = $sender;
13 years ago
$this->params = $params;
14 years ago
}
}