blob: 5116a5f41833649c630f3a9be1ce21114df48c36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
/**
* TEvent is the base class for all event classes.
*
* It encapsulates the parameters associated with an event.
* The {@link sender} property describes who raises the event.
* And the {@link handled} property indicates if the event is handled.
* If an event handler sets {@link handled} to true, those handlers
* that are not invoked yet will not be invoked anymore.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id: TEvent.php 978 2009-05-06 03:36:09Z qiang.xue $
* @package system.base
* @since 1.0
*/
class TEvent extends TComponent
{
/**
* @var object the sender of this event
*/
public $sender;
/**
* @var boolean whether the event is handled. Defaults to false.
* When a handler sets this true, the rest uninvoked handlers will not be invoked anymore.
*/
public $handled=false;
/**
* Constructor.
* @param mixed sender of the event
*/
public function __construct($sender=null)
{
parent::__construct();
$this->sender=$sender;
}
}
|