OpenID
[ class tree: OpenID ] [ index: OpenID ] [ all elements ]

Class: OpenID_Observer_Common

Source Location: /OpenID-0.4.0/OpenID/Observer/Common.php

Class Overview


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:


Author(s):

Copyright:

  • 2009 Bill Shupp

Variables

Methods


Child classes:

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.

Inherited Variables

Inherited Methods


Class Details

[line 39]
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);



[ Top ]


Class Variables

$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

Type:   array


[ Top ]



Method Detail

getEvents   [line 62]

array getEvents( )

Gets the current array of events

[ Top ]

setEvents   [line 75]

void setEvents( array $events)

Sets a custom array of events to act upon

Parameters:

array   $events   —  Array of events

[ Top ]

update   [line 87]

void update( array $event)

Acts upon an event that just occured
  • Abstract:
  • Access: public

Overridden in child classes as:

OpenID_Observer_Log::update()
Logs the event

Parameters:

array   $event   —  Event array, containing 'name' and 'data' keys

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:57:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.