Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

Observer Class Reference

Inheritance diagram for Observer:

Inheritance graph
List of all members.

Public Member Functions

 notify ($event, $msg)

Public Attributes

 $_observerId = ''
 This will be assigned by an observable object when attaching.

Detailed Description

Methods to override: notify($event, $msg) This implements the Observer design pattern defining the Observer class. Observer objects can be "attached" to Observable objects to listen for a specific event. Example:

$log = new Logger($logfile); //Logger extends Observer $foo = new Foo(); //Foo extends Observable $foo->attach('moo',$log); //Now $log observers 'moo' events in $foo class of $foo->attach_all($log); // Same but all events are listened

Definition at line 19 of file Observer.php.

The documentation for this class was generated from the following file:
Generated on Mon Jun 7 16:37:55 2004 for Galaxia by doxygen 1.3.4