Class EventTrigger

Description

The event trigger is an abstract class which handles the aggregation of EventListeners and can trigger events.

Located in /harmoni/core/architecture/events/EventTrigger.abstract.php (line 26)

SObject
   |
   --EventTrigger
Direct descendents
Class Description
ActionHandler The ActionHandler interface defines the required methods for an ActionHandler class.
Variable Summary
Method Summary
ref addEventListener (mixed $eventListener, string $eventType, ref 1)
void triggerEvent (string $eventType, ref $source, [optional $context = null])
Variables
array $_eventListeners = array() (line 31)
  • access: private
Methods
addEventListener (line 40)

Adds an EventListener to be triggered whenever an event is thrown.

  • return: object
  • access: public
ref addEventListener (mixed $eventListener, string $eventType, ref 1)
  • string $eventType: The string event type for which this EventListener is listening (example: "edu.middlebury.harmoni.action_executed")
  • ref 1: object $eventListener the EventListener object.
triggerEvent (line 59)

Notifies all of the EventListeners that have been added that an event has occured.

  • access: public
void triggerEvent (string $eventType, ref $source, [optional $context = null])
  • string $eventType: The event type string.
  • ref $source: object $source The source object of this event.
  • optional $context: array $context An array of contextual parameters for the specific event. The content of the array will depend on the event.

Inherited Methods

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

Documentation generated on Wed, 19 Sep 2007 10:23:03 -0400 by phpDocumentor 1.3.0RC3