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

Class: GenericEngine

Source Location: /lib/GenericEngine.php

Class Overview


A generic engine class.


Author(s):

Variables

Methods


Child classes:

AuthenticationEngine
Abstract authentication engine.
AuthorizationEngine

Class Details

[line 31]
A generic engine class.



Tags:

abstract:  


[ Top ]


Class Variables

$cfg =

[line 33]



Tags:

access:  protected

Type:   mixed


[ Top ]

$engine_type =

[line 36]



Tags:

access:  protected

Type:   mixed


[ Top ]

$handler =

[line 37]



Tags:

access:  protected

Type:   mixed


[ Top ]

$hooks = array()

[line 34]



Tags:

access:  protected

Type:   mixed


[ Top ]

$valid_hooks = array()

[line 35]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 44]

GenericEngine __construct( file $file, section $site)

Main constructor for the engine.



Tags:

access:  public


Overridden in child classes as:

OpenIDAuthnEngine::__construct()

Parameters:

file   $file   The path to the configuration file. Can be in the include path.
section   $site   The section of the configuration file, if any.

[ Top ]

method addHook [line 71]

boolean addHook( name $name, hook $hook)

Adds a function to the specified hook, which will be executed at some point of the code.



Tags:

return:  true if successful, false in any other case.
access:  public


Parameters:

name   $name   The name of the hook.
hook   $hook   A mixed object. Can be the name of a function (string) or an array with two elements: the former, the name of a class or an object, and the latter the name of the method.

[ Top ]

method clean [line 150]

void clean( )

Unregister error and exception handlers. Use it only for methods not declared in the interface that previously called registerHandler() method.



Tags:

access:  protected


[ Top ]

method configure [line 54]

void configure( file $file, section $section)

Configure the engine.



Tags:

access:  public


Overridden in child classes as:

OpenIDAuthnEngine::configure()
PAPIAuthnEngine::configure()
SimpleSAMLphpAuthnEngine::configure()
InviteAuthzEngine::configure()
Configure the authorization engine.

Parameters:

file   $file   The path to the configuration file. Can be in the include path.
section   $section   The section of the configuration file, if any.

[ Top ]

method registerHandler [line 140]

void registerHandler( )

Register error and exception handlers for logging. Use it only for methods not declared in the interface that could trigger errors.



Tags:

access:  protected


[ Top ]

method removeHook [line 93]

boolean removeHook( name $name, hook $hook)

Removes a function fromt he specified hook.



Tags:

return:  true if successful, false in any other case.
access:  public


Parameters:

name   $name   The name of the hook.
hook   $hook   A mixed object. Can be the name of a function (string) or an array with two elements: the former, the name of a class or an object, and the latter the name of the method.

[ Top ]

method runHooks [line 118]

void runHooks( hook $hook, params &$params)

Run all hooks attached to an specific action.



Tags:

access:  protected


Parameters:

hook   $hook   The name of the hook.
params   &$params   An array with all params (in order) that must be passed to the function.

[ Top ]

method setHandler [line 132]

void setHandler( handler $handler)

Set the event handler to the one specified.



Tags:

access:  public


Parameters:

handler   $handler   The event handler to use.

[ Top ]


Documentation generated on Tue, 14 Jun 2011 12:22:07 +0200 by phpDocumentor 1.4.3