Public Member Functions | Protected Attributes

Robo47_Auth_Adapter_Array Class Reference

List of all members.

Public Member Functions

 __construct ($username= '', $password= '', array $userData=array())
 authenticate ()
 getPassword ()
 getUserData ()
 getUsername ()
 setPassword ($password)
 setUserData (array $userData=array())
 setUsername ($username)

Protected Attributes

 $_password = ''
 $_userdata = array()
 $_username = ''

Detailed Description

Definition at line 31 of file Array.php.


Constructor & Destructor Documentation

Robo47_Auth_Adapter_Array::__construct ( username = '',
password = '',
array $  userData = array() 
)
Parameters:
string $username
string $password
array $userData

Definition at line 59 of file Array.php.

References setPassword(), setUserData(), and setUsername().

    {
        $this->setUsername($username);
        $this->setPassword($password);
        $this->setUserData($userData);
    }

Here is the call graph for this function:


Member Function Documentation

Robo47_Auth_Adapter_Array::authenticate (  ) 
Returns:
Zend_Auth_Result

Definition at line 130 of file Array.php.

    {
        foreach ($this->_userdata as $username => $password) {
            if ($username == $this->_username &&
                $password == $this->_password) {
                return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS,
                    $this->_username);
            }
        }
        return new Zend_Auth_Result(Zend_Auth_Result::FAILURE,
            $this->_username);
    }

Robo47_Auth_Adapter_Array::getPassword (  ) 
Returns:
string

Definition at line 102 of file Array.php.

    {
        return $this->_password;
    }

Robo47_Auth_Adapter_Array::getUserData (  ) 
Returns:
array

Definition at line 122 of file Array.php.

    {
        return $this->_userdata;
    }

Robo47_Auth_Adapter_Array::getUsername (  ) 
Returns:
string

Definition at line 93 of file Array.php.

    {
        return $this->_username;
    }

Robo47_Auth_Adapter_Array::setPassword ( password  ) 
Parameters:
string $password
Returns:
Robo47_Auth_Adapter_Array *Provides Fluent Interface*

Definition at line 83 of file Array.php.

Referenced by __construct().

    {
        $this->_password = $password;
        return $this;
    }

Here is the caller graph for this function:

Robo47_Auth_Adapter_Array::setUserData ( array $  userData = array()  ) 
Parameters:
array $userdata Array with index -> username, value = password
Returns:
Robo47_Auth_Adapter_Array *Provides Fluent Interface*

Definition at line 112 of file Array.php.

Referenced by __construct().

    {
        $this->_userdata = $userData;
        return $this;
    }

Here is the caller graph for this function:

Robo47_Auth_Adapter_Array::setUsername ( username  ) 
Parameters:
string $username
Returns:
Robo47_Auth_Adapter_Array *Provides Fluent Interface*

Definition at line 72 of file Array.php.

Referenced by __construct().

    {
        $this->_username = $username;
        return $this;
    }

Here is the caller graph for this function:


Member Data Documentation

Robo47_Auth_Adapter_Array::$_password = '' [protected]

Definition at line 45 of file Array.php.

Robo47_Auth_Adapter_Array::$_userdata = array() [protected]

Definition at line 51 of file Array.php.

Robo47_Auth_Adapter_Array::$_username = '' [protected]

Definition at line 39 of file Array.php.


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