ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAuthContainerDecorator Class Reference

Abstract decorator for PEAR::Auth Base class for all Ilias Authentication classes. More...

+ Collaboration diagram for ilAuthContainerDecorator:

Public Member Functions

 __construct ()
 Constructor.
 __call ($name, $arguments)
 Wrapper for all PEAR_Auth_Container methods.
 getContainer ()
 get pear container
 setContainer ($a_container)
 set pear container
 getAuthObject ()
 appendParameter ($a_key, $a_value)
 Add a parameter.
 appendParameters ($a_params)
 getParameters ()
 get auth container parameters
 loginObserver ($a_username, $a_auth)
 failedLoginObserver ($a_username, $a_auth)
 Called from base class after failed login.
 checkAuthObserver ($a_username, $a_auth)
 Called from base class after call of checkAuth.
 logoutObserver ($a_username, $a_auth)
 Called from base class after logout.

Protected Member Functions

 initContainer ()
 Init the PEAR container.

Protected Attributes

 $parameter = array()

Private Attributes

 $container = null

Detailed Description

Abstract decorator for PEAR::Auth Base class for all Ilias Authentication classes.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 34 of file class.ilAuthContainerDecorator.php.

Constructor & Destructor Documentation

ilAuthContainerDecorator::__construct ( )

Constructor.

Parameters

Definition at line 43 of file class.ilAuthContainerDecorator.php.

{
}

Member Function Documentation

ilAuthContainerDecorator::__call (   $name,
  $arguments 
)
final

Wrapper for all PEAR_Auth_Container methods.

Parameters
@return

Definition at line 55 of file class.ilAuthContainerDecorator.php.

{
return call_user_func_array(array($this->container,$name),$arguments);
}
ilAuthContainerDecorator::appendParameter (   $a_key,
  $a_value 
)

Add a parameter.

Used for contructor in PEAR_Auth_Container

Definition at line 90 of file class.ilAuthContainerDecorator.php.

{
$this->parameter[$a_key] = $a_value;
}
ilAuthContainerDecorator::appendParameters (   $a_params)

Definition at line 95 of file class.ilAuthContainerDecorator.php.

{
$this->parameter = array_merge($this->parameter,$a_params);
}
ilAuthContainerDecorator::checkAuthObserver (   $a_username,
  $a_auth 
)

Called from base class after call of checkAuth.

Parameters
stringusername
objectPEAR auth object

Definition at line 147 of file class.ilAuthContainerDecorator.php.

References $ilLog.

{
global $ilLog;
//$ilLog->write(__METHOD__.': checkAuth called');
return true;
}
ilAuthContainerDecorator::failedLoginObserver (   $a_username,
  $a_auth 
)

Called from base class after failed login.

Parameters
stringusername
objectPEAR auth object

Definition at line 130 of file class.ilAuthContainerDecorator.php.

References $ilLog.

{
global $ilLog;
$ilLog->write(__METHOD__.': login failed for user '.$a_username.
', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
);
return false;
}
ilAuthContainerDecorator::getAuthObject ( )

Definition at line 82 of file class.ilAuthContainerDecorator.php.

References getContainer().

{
return $this->getContainer()->_auth_obj;
}

+ Here is the call graph for this function:

ilAuthContainerDecorator::getContainer ( )

get pear container

Definition at line 68 of file class.ilAuthContainerDecorator.php.

References $container.

Referenced by getAuthObject().

{
}

+ Here is the caller graph for this function:

ilAuthContainerDecorator::getParameters ( )

get auth container parameters

Definition at line 103 of file class.ilAuthContainerDecorator.php.

{
return $this->parameter ? $this->parameter : array();
}
ilAuthContainerDecorator::initContainer ( )
abstractprotected

Init the PEAR container.

ilAuthContainerDecorator::loginObserver (   $a_username,
  $a_auth 
)
Returns
Parameters
object$a_username
object$a_auth

Definition at line 114 of file class.ilAuthContainerDecorator.php.

References $ilLog.

{
global $ilLog;
$ilLog->write(__METHOD__.': logged in as '.$a_username.
', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
);
}
ilAuthContainerDecorator::logoutObserver (   $a_username,
  $a_auth 
)

Called from base class after logout.

Parameters
stringusername
objectPEAR auth object

Definition at line 162 of file class.ilAuthContainerDecorator.php.

References $ilLog.

{
global $ilLog;
$ilLog->write(__METHOD__.': User logged out: '.$a_username.
', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
);
}
ilAuthContainerDecorator::setContainer (   $a_container)

set pear container

Definition at line 76 of file class.ilAuthContainerDecorator.php.

{
$this->container = $a_container;
}

Field Documentation

ilAuthContainerDecorator::$container = null
private

Definition at line 36 of file class.ilAuthContainerDecorator.php.

Referenced by getContainer().

ilAuthContainerDecorator::$parameter = array()
protected

Definition at line 37 of file class.ilAuthContainerDecorator.php.


The documentation for this class was generated from the following file: