Changeset 141

Show
Ignore:
Timestamp:
01/23/07 17:09:19 (2 years ago)
Author:
mikey
Message:

added some more documentation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/events/stubCallbackListener.php

    r97 r141  
    1313/** 
    1414 * 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. 
    1519 * 
    1620 * @package     stubbles 
  • trunk/src/main/php/net/stubbles/events/stubEvent.php

    r65 r141  
    99/** 
    1010 * 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. 
    1118 * 
    1219 * @package     stubbles 
    1320 * @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/ 
    1424 */ 
    1525class stubEvent extends stubBaseObject 
     
    2232    protected $name      = ''; 
    2333    /** 
    24      * switch whether event was cancelled 
     34     * switch whether event was cancelled or not 
    2535     * 
    2636     * @var  bool 
     
    4353     * creates the event 
    4454     * 
    45      * @param  string  $name     action that should be notified in case of event happens 
     55     * @param  string  $name     name of event 
    4656     * @param  mixed   $context  optional  context for the event 
    4757     * @param  array   $info     optional  additional information about the event circumstances 
  • trunk/src/main/php/net/stubbles/events/stubEventDispatcher.php

    r97 r141  
    1414 * Class for register and notify event listeners that should be triggered in case 
    1515 * 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. 
    1621 * 
    1722 * @package     stubbles 
    1823 * @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/ 
    1927 */ 
    2028class stubEventDispatcher extends stubBaseObject 
  • trunk/src/main/php/net/stubbles/events/stubEventListener.php

    r48 r141  
    99/** 
    1010 * 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). 
    1119 * 
    1220 * @package     stubbles 
    1321 * @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/ 
    1425 */ 
    1526interface stubEventListener