PHP Class ZFExt_Auth_Adapter_Doctrine, ZFPlanet

Inheritance: implements Zend_Auth_Adapter_Interface
Show file Open project: padraic/ZFPlanet Class Usage Examples

Protected Properties

Property Type Description
$_authenticateResultInfo array $_authenticateResultInfo
$_credential string $_credential - Credential values
$_credentialColumn string $_credentialColumns - columns to be used as the credentials
$_credentialTreatment string $_credentialTreatment - Treatment applied to the credential, such as MD5() or PASSWORD()
$_identity string $_identity - Identity value
$_identityColumn string $_identityColumn - the column to use as the identity
$_modelName string $_tableName - the table name to check
$_result array $_result - Results of database authentication query

Public Methods

Method Description
__construct ( string $modelName = null, string $identityColumn = null, string $credentialColumn = null, string $credentialTreatment = null ) : void __construct() - Sets configuration options
authenticate ( ) : Zend_Auth_Result authenticate() - defined by Zend_Auth_Adapter_Interface. This method is called to attempt an authentication. Previous to this call, this adapter would have already been configured with all necessary information to successfully connect to a database table and attempt to find a record matching the provided identity.
setCredential ( string $credential ) : ZFExt_Auth_Adapter_Doctrine setCredential() - set the credential value to be used, optionally can specify a treatment to be used, should be supplied in parameterized form, such as 'MD5(?)' or 'PASSWORD(?)'
setCredentialColumn ( string $credentialColumn ) : ZFExt_Auth_Adapter_Doctrine setCredentialColumn() - set the column name to be used as the credential column
setCredentialTreatment ( string $treatment ) : ZFExt_Auth_Adapter_Doctrine setCredentialTreatment() - Sets a hash algorithm passed to PHP's hash() before the password is added to a SELECT query. The DB's expressions are not used (it's my class damn it! :p) since many are simply weak or inappropriate anyway.
setIdentity ( string $value ) : ZFExt_Auth_Adapter_Doctrine setIdentity() - set the value to be used as the identity
setIdentityColumn ( string $identityColumn ) : ZFExt_Auth_Adapter_Doctrine setIdentityColumn() - set the column name to be used as the identity column
setModelName ( string $modelName ) : ZFExt_Auth_Adapter_Doctrine setModelName() - set the model name to be used in the select query

Protected Methods

Method Description
_authenticateCreateAuthResult ( ) : Zend_Auth_Result _authenticateCreateAuthResult() - Creates a Zend_Auth_Result object from the information that has been collected during the authenticate() attempt.
_authenticateSetup ( ) : true _authenticateSetup() - This method abstracts the steps involved with making sure that this adapter was indeed setup properly with all required pieces of information.
_authenticateValidateResultSet ( array $resultIdentities ) : true | Zend_Auth_Result _authenticateValidateResultSet() - This method attempts to make certain that only one record was returned in the resultset

Method Details

__construct() public method

__construct() - Sets configuration options
public __construct ( string $modelName = null, string $identityColumn = null, string $credentialColumn = null, string $credentialTreatment = null ) : void
$modelName string
$identityColumn string
$credentialColumn string
$credentialTreatment string
return void

_authenticateCreateAuthResult() protected method

_authenticateCreateAuthResult() - Creates a Zend_Auth_Result object from the information that has been collected during the authenticate() attempt.
protected _authenticateCreateAuthResult ( ) : Zend_Auth_Result
return Zend_Auth_Result

_authenticateSetup() protected method

_authenticateSetup() - This method abstracts the steps involved with making sure that this adapter was indeed setup properly with all required pieces of information.
protected _authenticateSetup ( ) : true
return true

_authenticateValidateResultSet() protected method

_authenticateValidateResultSet() - This method attempts to make certain that only one record was returned in the resultset
protected _authenticateValidateResultSet ( array $resultIdentities ) : true | Zend_Auth_Result
$resultIdentities array
return true | Zend_Auth_Result

authenticate() public method

authenticate() - defined by Zend_Auth_Adapter_Interface. This method is called to attempt an authentication. Previous to this call, this adapter would have already been configured with all necessary information to successfully connect to a database table and attempt to find a record matching the provided identity.
public authenticate ( ) : Zend_Auth_Result
return Zend_Auth_Result

setCredential() public method

setCredential() - set the credential value to be used, optionally can specify a treatment to be used, should be supplied in parameterized form, such as 'MD5(?)' or 'PASSWORD(?)'
public setCredential ( string $credential ) : ZFExt_Auth_Adapter_Doctrine
$credential string
return ZFExt_Auth_Adapter_Doctrine Provides a fluent interface

setCredentialColumn() public method

setCredentialColumn() - set the column name to be used as the credential column
public setCredentialColumn ( string $credentialColumn ) : ZFExt_Auth_Adapter_Doctrine
$credentialColumn string
return ZFExt_Auth_Adapter_Doctrine Provides a fluent interface

setCredentialTreatment() public method

setCredentialTreatment() - Sets a hash algorithm passed to PHP's hash() before the password is added to a SELECT query. The DB's expressions are not used (it's my class damn it! :p) since many are simply weak or inappropriate anyway.
public setCredentialTreatment ( string $treatment ) : ZFExt_Auth_Adapter_Doctrine
$treatment string
return ZFExt_Auth_Adapter_Doctrine Provides a fluent interface

setIdentity() public method

setIdentity() - set the value to be used as the identity
public setIdentity ( string $value ) : ZFExt_Auth_Adapter_Doctrine
$value string
return ZFExt_Auth_Adapter_Doctrine Provides a fluent interface

setIdentityColumn() public method

setIdentityColumn() - set the column name to be used as the identity column
public setIdentityColumn ( string $identityColumn ) : ZFExt_Auth_Adapter_Doctrine
$identityColumn string
return ZFExt_Auth_Adapter_Doctrine Provides a fluent interface

setModelName() public method

setModelName() - set the model name to be used in the select query
public setModelName ( string $modelName ) : ZFExt_Auth_Adapter_Doctrine
$modelName string
return ZFExt_Auth_Adapter_Doctrine Provides a fluent interface

Property Details

$_authenticateResultInfo protected property

$_authenticateResultInfo
protected array $_authenticateResultInfo
return array

$_credential protected property

$_credential - Credential values
protected string $_credential
return string

$_credentialColumn protected property

$_credentialColumns - columns to be used as the credentials
protected string $_credentialColumn
return string

$_credentialTreatment protected property

$_credentialTreatment - Treatment applied to the credential, such as MD5() or PASSWORD()
protected string $_credentialTreatment
return string

$_identity protected property

$_identity - Identity value
protected string $_identity
return string

$_identityColumn protected property

$_identityColumn - the column to use as the identity
protected string $_identityColumn
return string

$_modelName protected property

$_tableName - the table name to check
protected string $_modelName
return string

$_result protected property

$_result - Results of database authentication query
protected array $_result
return array