\Zend_Auth_Adapter_DbTable
- Copyright: Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Auth_Adapter_DbTable
implements
Zend_Auth_Adapter_Interface
{
- // members
- protected Zend_Db_Adapter_Abstract $_zendDb = NULL;
- protected Zend_Db_Select $_dbSelect = NULL;
- protected $_tableName = NULL;
- protected $_identityColumn = NULL;
- protected $_credentialColumn = NULL;
- protected $_identity = NULL;
- protected $_credential = NULL;
- protected $_credentialTreatment = NULL;
- protected $_authenticateResultInfo = NULL;
- protected $_resultRow = NULL;
- protected boolean $_ambiguityIdentity = false;
- // methods
- public void __construct()
- protected Zend_Auth_Adapter_DbTable _setDbAdapter()
- public Zend_Auth_Adapter_DbTable setTableName()
- public Zend_Auth_Adapter_DbTable setIdentityColumn()
- public Zend_Auth_Adapter_DbTable setCredentialColumn()
- public Zend_Auth_Adapter_DbTable setCredentialTreatment()
- public Zend_Auth_Adapter_DbTable setIdentity()
- public Zend_Auth_Adapter_DbTable setCredential()
- public Zend_Auth_Adapter_DbTable setAmbiguityIdentity()
- public bool getAmbiguityIdentity()
- public Zend_Db_Select getDbSelect()
- public stdClass|boolean getResultRowObject()
- public Zend_Auth_Result authenticate()
- protected true _authenticateSetup()
- protected Zend_Db_Select _authenticateCreateSelect()
- protected array _authenticateQuerySelect()
- protected true|Zend_Auth_Result _authenticateValidateResultSet()
- protected Zend_Auth_Result _authenticateValidateResult()
- protected Zend_Auth_Result _authenticateCreateAuthResult()
Hierarchy
Implements
Members
protected
- $_ambiguityIdentity
—
boolean
$_ambiguityIdentity - Flag to indicate same Identity can be used with different credentials. Default is FALSE and need to be set to true to allow ambiguity usage. - $_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() - $_dbSelect — Zend_Db_Select
- $_identity
—
string
$_identity - Identity value - $_identityColumn
—
string
$_identityColumn - the column to use as the identity - $_resultRow
—
array
$_resultRow - Results of database authentication query - $_tableName
—
string
$_tableName - the table name to check - $_zendDb
—
Zend_Db_Adapter_Abstract
Database Connection
Methods
protected
- _authenticateCreateAuthResult() — _authenticateCreateAuthResult() - Creates a Zend_Auth_Result object from the information that has been collected during the authenticate() attempt.
- _authenticateCreateSelect() — _authenticateCreateSelect() - This method creates a Zend_Db_Select object that is completely configured to be queried against the database.
- _authenticateQuerySelect() — _authenticateQuerySelect() - This method accepts a Zend_Db_Select object and performs a query against the database with that object.
- _authenticateSetup() — _authenticateSetup() - This method abstracts the steps involved with making sure that this adapter was indeed setup properly with all required pieces of information.
- _authenticateValidateResult() — _authenticateValidateResult() - This method attempts to validate that the record in the resultset is indeed a record that matched the identity provided to this adapter.
- _authenticateValidateResultSet() — _authenticateValidateResultSet() - This method attempts to make certain that only one record was returned in the resultset
- _setDbAdapter() — _setDbAdapter() - set the database adapter to be used for quering
public
- __construct() — __construct() - Sets configuration options
- authenticate() — 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.
- getAmbiguityIdentity() — getAmbiguityIdentity() - returns TRUE for usage of multiple identical identies with different credentials, FALSE if not used.
- getDbSelect() — getDbSelect() - Return the preauthentication Db Select object for userland select query modification
- getResultRowObject() — getResultRowObject() - Returns the result row as a stdClass object
- setAmbiguityIdentity() — setAmbiguityIdentity() - sets a flag for usage of identical identities with unique credentials. It accepts integers (0, 1) or boolean (true, false) parameters. Default is false.
- setCredential() — 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() — setCredentialColumn() - set the column name to be used as the credential column
- setCredentialTreatment() — setCredentialTreatment() - allows the developer to pass a parameterized string that is used to transform or treat the input credential data.
- setIdentity() — setIdentity() - set the value to be used as the identity
- setIdentityColumn() — setIdentityColumn() - set the column name to be used as the identity column
- setTableName() — setTableName() - set the table name to be used in the select query