Auth/Adapter/DbTable.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Auth
- Subpackage
- Adapter
- Version
- $Id$
\Zend_Auth_Adapter_DbTable
Package: Zend_Auth\Adapter- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



boolean $_ambiguityIdentity = false
$_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.
Default valuefalse
Details- Type
- boolean



string $_credential = null
$_credential - Credential values
Default valuenull
Details- Type
- string



string $_credentialColumn = null
$_credentialColumns - columns to be used as the credentials
Default valuenull
Details- Type
- string



string $_credentialTreatment = null
$_credentialTreatment - Treatment applied to the credential, such as MD5() or PASSWORD()
Default valuenull
Details- Type
- string



string $_identity = null
$_identity - Identity value
Default valuenull
Details- Type
- string



string $_identityColumn = null
$_identityColumn - the column to use as the identity
Default valuenull
Details- Type
- string



array $_resultRow = null
$_resultRow - Results of database authentication query
Default valuenull
Details- Type
- array



string $_tableName = null
$_tableName - the table name to check
Default valuenull
Details- Type
- string
Methods



__construct(\Zend_Db_Adapter_Abstract $zendDb = null, string $tableName = null, string $identityColumn = null, string $credentialColumn = null, string $credentialTreatment = null) : void
__construct() - Sets configuration options
ParametersName | Type | Description |
---|
$zendDb | \Zend_Db_Adapter_Abstract | If null, default database adapter assumed |
---|
$tableName | string | |
---|
$identityColumn | string | |
---|
$credentialColumn | string | |
---|
$credentialTreatment | string | |
---|



_authenticateValidateResult(array $resultIdentity) : \Zend_Auth_Result
_authenticateValidateResult() - This method attempts to validate that
the record in the resultset is indeed a record that matched the
identity provided to this adapter.
ParametersName | Type | Description |
---|
$resultIdentity | array | |
---|
Returns 


_authenticateValidateResultSet(array $resultIdentities) : true | \Zend_Auth_Result
_authenticateValidateResultSet() - This method attempts to make
certain that only one record was returned in the resultset
ParametersName | Type | Description |
---|
$resultIdentities | array | |
---|
Returns 


_setDbAdapter( $zendDb = null) : \Zend_Auth_Adapter_DbTable
_setDbAdapter() - set the database adapter to be used for quering
ParametersName | Type | Description |
---|
$zendDb | | |
---|
ReturnsThrows 


getResultRowObject(string | array $returnColumns = null, string | array $omitColumns = null) : \stdClass | boolean
getResultRowObject() - Returns the result row as a stdClass object
ParametersName | Type | Description |
---|
$returnColumns | string | array | |
---|
$omitColumns | string | array | |
---|
Returns 


setAmbiguityIdentity(int | bool $flag) : \Zend_Auth_Adapter_DbTable
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.
ParametersName | Type | Description |
---|
$flag | int | bool | |
---|
Returns 


setCredential(string $credential) : \Zend_Auth_Adapter_DbTable
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(?)'
ParametersName | Type | Description |
---|
$credential | string | |
---|
Returns 


setCredentialColumn(string $credentialColumn) : \Zend_Auth_Adapter_DbTable
setCredentialColumn() - set the column name to be used as the credential column
ParametersName | Type | Description |
---|
$credentialColumn | string | |
---|
Returns 


setCredentialTreatment(string $treatment) : \Zend_Auth_Adapter_DbTable
setCredentialTreatment() - allows the developer to pass a parameterized string that is
used to transform or treat the input credential data.
In many cases, passwords and other sensitive data are encrypted, hashed, encoded,
obscured, or otherwise treated through some function or algorithm. By specifying a
parameterized treatment string with this method, a developer may apply arbitrary SQL
upon input credential data.
Examples:
'PASSWORD(?)'
'MD5(?)'
ParametersName | Type | Description |
---|
$treatment | string | |
---|
Returns


setIdentity(string $value) : \Zend_Auth_Adapter_DbTable
setIdentity() - set the value to be used as the identity
ParametersName | Type | Description |
---|
$value | string | |
---|
Returns 


setIdentityColumn(string $identityColumn) : \Zend_Auth_Adapter_DbTable
setIdentityColumn() - set the column name to be used as the identity column
ParametersName | Type | Description |
---|
$identityColumn | string | |
---|
Returns 


setTableName(string $tableName) : \Zend_Auth_Adapter_DbTable
setTableName() - set the table name to be used in the select query
ParametersName | Type | Description |
---|
$tableName | string | |
---|
Returns