Changeset 141
- Timestamp:
- 01/23/07 17:09:19 (2 years ago)
- Files:
-
- trunk/src/main/php/net/stubbles/events/stubCallbackListener.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/events/stubEvent.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/events/stubEventDispatcher.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/events/stubEventListener.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/events/stubCallbackListener.php
r97 r141 13 13 /** 14 14 * Class for a callback on objects not implementing the EventListener interface. 15 * 16 * This listener allows to register arbitrary classes for events in the event 17 * dispatcher without the need that these classes have to implement the 18 * stubEventListener interface. 15 19 * 16 20 * @package stubbles trunk/src/main/php/net/stubbles/events/stubEvent.php
r65 r141 9 9 /** 10 10 * Container for events. 11 * 12 * An event is triggered via the stubEventDispatcher. It contains the name of 13 * the event, and optionally the context in which the event occurred and any 14 * other information the may be of interest from the place where the event 15 * was triggered. 16 * Events can be cancelled which means that any other subsequent listeners to 17 * an event with the same name will not be notified about the event. 11 18 * 12 19 * @package stubbles 13 20 * @subpackage events 21 * @see http://schst.net/downloads/presentations/event-driven.pdf 22 * @see http://pear.php.net/package/Event_Dispatcher 23 * @see http://developer.apple.com/documentation/Cocoa/Conceptual/Notifications/ 14 24 */ 15 25 class stubEvent extends stubBaseObject … … 22 32 protected $name = ''; 23 33 /** 24 * switch whether event was cancelled 34 * switch whether event was cancelled or not 25 35 * 26 36 * @var bool … … 43 53 * creates the event 44 54 * 45 * @param string $name action that should be notified in case of event happens55 * @param string $name name of event 46 56 * @param mixed $context optional context for the event 47 57 * @param array $info optional additional information about the event circumstances trunk/src/main/php/net/stubbles/events/stubEventDispatcher.php
r97 r141 14 14 * Class for register and notify event listeners that should be triggered in case 15 15 * of an event. 16 * 17 * The event dispatcher is the heart of the event system. It can be used to 18 * connect classes without the requirement to wire these classes directly. 19 * Effectively, the connected classes don't even have to know about the existence 20 * of the other classes. 16 21 * 17 22 * @package stubbles 18 23 * @subpackage events 24 * @see http://schst.net/downloads/presentations/event-driven.pdf 25 * @see http://pear.php.net/package/Event_Dispatcher 26 * @see http://developer.apple.com/documentation/Cocoa/Conceptual/Notifications/ 19 27 */ 20 28 class stubEventDispatcher extends stubBaseObject trunk/src/main/php/net/stubbles/events/stubEventListener.php
r48 r141 9 9 /** 10 10 * Interface for event listeners called by stubEventDispatcher::trigger() 11 * 12 * Event listeners can be registered in the stubEventDispatcher for events. If 13 * an event is triggered the listener will be notified via its handleEvent() 14 * method in case the event has the same name as the events the listener was 15 * registered for. 16 * Listeners can decide whether they want to handle an event only once 17 * (autoremove() returns true) or if they want to handle every event with the 18 * name they are registered for (autoremove() returns false). 11 19 * 12 20 * @package stubbles 13 21 * @subpackage events 22 * @see http://schst.net/downloads/presentations/event-driven.pdf 23 * @see http://pear.php.net/package/Event_Dispatcher 24 * @see http://developer.apple.com/documentation/Cocoa/Conceptual/Notifications/ 14 25 */ 15 26 interface stubEventListener
