Class OpenID_Observer_Common

Description

Allows for observers to listen in to key events. The most common use case is for logging. To use OpenID_Observe_Log, for example you could do this:

  1.   $log new OpenID_Observer_Log;
  2.   OpenID::attach($log);

Now, your logs will by default go to /tmp/OpenID_Observer_Log.log. To stop observing, just detach like so:

  1.   OpenID::detach($log);

Located in /OpenID/Observer/Common.php (line 39)


	
			
Direct descendents
Class Description
OpenID_Observer_Log An observer based on PEAR's Log package. You may either pass in your own Log instance to the constructor, or allow the default file driver to write to /tmp/OpenID_Observer_Log.log by default.
Variable Summary
array $events
Method Summary
array getEvents ()
void setEvents ( $events)
void update ( $event)
Variables
array $events = array(
'OpenID_Association_Request::sendAssociationRequest',
'OpenID_Association::checkMessageSignature',
'OpenID_Assertion::validateReturnTo',
'OpenID_Assertion::validateReturnToNonce',
'OpenID_RelyingParty::verify',
'OpenID_Auth_Request::addNonce',
)
(line 47)

Events to act upon

Methods
getEvents (line 62)

Gets the current array of events

array getEvents ()
setEvents (line 75)

Sets a custom array of events to act upon

void setEvents ( $events)
  • array $events: Array of events
update (line 87)

Acts upon an event that just occured

  • abstract:
  • access: public
void update ( $event)
  • array $event: Event array, containing 'name' and 'data' keys

Redefined in descendants as:

Documentation generated on Tue, 15 Dec 2009 19:00:52 -0800 by phpDocumentor 1.4.3