API Documentation

Auth/Adapter/DbTable.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Auth
subpackage
Adapter
version
$Id: DbTable.php 22614 2010-07-17 13:46:07Z dragonbe $
Classes
Zend_Auth_Adapter_DbTable

Description

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.

Zend_Auth_Adapter_DbTable

Implements
Zend_Auth_Adapter_Interface
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Auth
subpackage
Adapter
Properties
$_zendDb
$_dbSelect
$_tableName
$_identityColumn
$_credentialColumn
$_identity
$_credential
$_credentialTreatment
$_authenticateResultInfo
$_resultRow
$_ambiguityIdentity
Methods
__construct
_setDbAdapter
setTableName
setIdentityColumn
setCredentialColumn
setCredentialTreatment
setIdentity
setCredential
setAmbiguityIdentity
getAmbiguityIdentity
getDbSelect
getResultRowObject
authenticate
_authenticateSetup
_authenticateCreateSelect
_authenticateQuerySelect
_authenticateValidateResultSet
_authenticateValidateResult
_authenticateCreateAuthResult

Description

Properties

$_ambiguityIdentity

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.

Details

$_ambiguityIdentity
boolean
visibility
protected
default
false
final
false
static
false

$_authenticateResultInfo

array $_authenticateResultInfo = 'null'

$_authenticateResultInfo

Details

$_authenticateResultInfo
array
visibility
protected
default
null
final
false
static
false

$_credential

string $_credential = 'null'

$_credential - Credential values

Details

$_credential
string
visibility
protected
default
null
final
false
static
false

$_credentialColumn

string $_credentialColumn = 'null'

$_credentialColumns - columns to be used as the credentials

Details

$_credentialColumn
string
visibility
protected
default
null
final
false
static
false

$_credentialTreatment

string $_credentialTreatment = 'null'

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

Details

$_credentialTreatment
string
visibility
protected
default
null
final
false
static
false

$_dbSelect

Zend_Db_Select $_dbSelect = 'null'

Details

$_dbSelect
Zend_Db_Select
visibility
protected
default
null
final
false
static
false

$_identity

string $_identity = 'null'

$_identity - Identity value

Details

$_identity
string
visibility
protected
default
null
final
false
static
false

$_identityColumn

string $_identityColumn = 'null'

$_identityColumn - the column to use as the identity

Details

$_identityColumn
string
visibility
protected
default
null
final
false
static
false

$_resultRow

array $_resultRow = 'null'

$_resultRow - Results of database authentication query

Details

$_resultRow
array
visibility
protected
default
null
final
false
static
false

$_tableName

string $_tableName = 'null'

$_tableName - the table name to check

Details

$_tableName
string
visibility
protected
default
null
final
false
static
false

$_zendDb

Zend_Db_Adapter_Abstract $_zendDb = 'null'

Database Connection

Details

$_zendDb
Zend_Db_Adapter_Abstract
visibility
protected
default
null
final
false
static
false

Methods

__construct

__construct( Zend_Db_Adapter_Abstract $zendDb = null, string $tableName = null, string $identityColumn = null, string $credentialColumn = null, string $credentialTreatment = null ) : void

__construct() - Sets configuration options

Arguments
$zendDb
Zend_Db_Adapter_Abstract
If null, default database adapter assumed
$tableName
string
$identityColumn
string
$credentialColumn
string
$credentialTreatment
string
Details
visibility
public
final
false
static
false

_authenticateCreateAuthResult

_authenticateCreateAuthResult( ) : Zend_Auth_Result

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

Details
visibility
protected
final
false
static
false

_authenticateCreateSelect

_authenticateCreateSelect( ) : Zend_Db_Select

_authenticateCreateSelect() - This method creates a Zend_Db_Select object that is completely configured to be queried against the database.

Details
visibility
protected
final
false
static
false

_authenticateQuerySelect

_authenticateQuerySelect( Zend_Db_Select $dbSelect ) : array

_authenticateQuerySelect() - This method accepts a Zend_Db_Select object and performs a query against the database with that object.

Arguments
$dbSelect
Zend_Db_Select
Output
array
Details
visibility
protected
final
false
static
false
throws
- when an invalid select object is encountered

_authenticateSetup

_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.

Output
true
Details
visibility
protected
final
false
static
false
throws
- in the event that setup was not done properly

_authenticateValidateResult

_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.

Arguments
$resultIdentity
array
Details
visibility
protected
final
false
static
false

_authenticateValidateResultSet

_authenticateValidateResultSet( array $resultIdentities ) : true|Zend_Auth_Result

_authenticateValidateResultSet() - This method attempts to make certain that only one record was returned in the resultset

Arguments
$resultIdentities
array
Output
true|Zend_Auth_Result
Details
visibility
protected
final
false
static
false

_setDbAdapter

_setDbAdapter(  $zendDb = null ) : Zend_Auth_Adapter_DbTable

_setDbAdapter() - set the database adapter to be used for quering

Arguments
$zendDb
Zend_Db_Adapter_Abstract
Details
visibility
protected
final
false
static
false
throws

authenticate

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.

Details
visibility
public
final
false
static
false
throws
if answering the authentication query is impossible

getAmbiguityIdentity

getAmbiguityIdentity( ) : bool

getAmbiguityIdentity() - returns TRUE for usage of multiple identical identies with different credentials, FALSE if not used.

Output
bool
Details
visibility
public
final
false
static
false

getDbSelect

getDbSelect( ) : Zend_Db_Select

getDbSelect() - Return the preauthentication Db Select object for userland select query modification

Details
visibility
public
final
false
static
false

getResultRowObject

getResultRowObject( string|array $returnColumns = null, string|array $omitColumns = null ) : stdClass|boolean

getResultRowObject() - Returns the result row as a stdClass object

Arguments
$returnColumns
stringarray
$omitColumns
stringarray
Output
stdClass|boolean
Details
visibility
public
final
false
static
false

setAmbiguityIdentity

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.

Arguments
$flag
intbool
Details
visibility
public
final
false
static
false

setCredential

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(?)'

Arguments
$credential
string
Output
Zend_Auth_Adapter_DbTable
Provides a fluent interface
Details
visibility
public
final
false
static
false

setCredentialColumn

setCredentialColumn( string $credentialColumn ) : Zend_Auth_Adapter_DbTable

setCredentialColumn() - set the column name to be used as the credential column

Arguments
$credentialColumn
string
Output
Zend_Auth_Adapter_DbTable
Provides a fluent interface
Details
visibility
public
final
false
static
false

setCredentialTreatment

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(?)'

Arguments
$treatment
string
Output
Zend_Auth_Adapter_DbTable
Provides a fluent interface
Details
visibility
public
final
false
static
false

setIdentity

setIdentity( string $value ) : Zend_Auth_Adapter_DbTable

setIdentity() - set the value to be used as the identity

Arguments
$value
string
Output
Zend_Auth_Adapter_DbTable
Provides a fluent interface
Details
visibility
public
final
false
static
false

setIdentityColumn

setIdentityColumn( string $identityColumn ) : Zend_Auth_Adapter_DbTable

setIdentityColumn() - set the column name to be used as the identity column

Arguments
$identityColumn
string
Output
Zend_Auth_Adapter_DbTable
Provides a fluent interface
Details
visibility
public
final
false
static
false

setTableName

setTableName( string $tableName ) : Zend_Auth_Adapter_DbTable

setTableName() - set the table name to be used in the select query

Arguments
$tableName
string
Output
Zend_Auth_Adapter_DbTable
Provides a fluent interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.