21. Class

21.1. Zend\Authentication\Adapter\DbTable

21.1.1. Methods

21.1.1.1. __construct

__construct()

__construct() - Sets configuration options

Parameters:
  • DbAdapter
  • string – Optional
  • string – Optional
  • string – Optional
  • string – Optional
Return type:

ZendAuthenticationAdapterDbTable

21.1.1.2. setTableName

setTableName()

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

Parameters:string
Return type:DbTable Provides a fluent interface

21.1.1.3. setIdentityColumn

setIdentityColumn()

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

Parameters:string
Return type:DbTable Provides a fluent interface

21.1.1.4. setCredentialColumn

setCredentialColumn()

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

Parameters:string
Return type:DbTable Provides a fluent interface

21.1.1.5. setCredentialTreatment

setCredentialTreatment()

setCredentialTreatment() - allows the developer to pass a parametrized 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 parametrized treatment string with this method, a developer may apply arbitrary SQL upon input credential data.

Examples:

‘PASSWORD(?)’ ‘MD5(?)’
Parameters:string
Return type:DbTable Provides a fluent interface

21.1.1.6. setAmbiguityIdentity

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.

Parameters:int|bool
Return type:DbTable Provides a fluent interface

21.1.1.7. getAmbiguityIdentity

getAmbiguityIdentity()

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

Return type:bool

21.1.1.8. getDbSelect

getDbSelect()

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

Return type:DbSelect

21.1.1.9. getResultRowObject

getResultRowObject()

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

Parameters:
  • string|array
  • string|array
Return type:

stdClass|bool

21.1.1.10. authenticate

authenticate()

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.

Return type:AuthenticationResult

21.1.1.11. _authenticateSetup

_authenticateSetup()

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

Return type:bool

21.1.1.12. _authenticateCreateSelect

_authenticateCreateSelect()

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

Return type:DbSelect

21.1.1.13. _authenticateQuerySelect

_authenticateQuerySelect()

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

Parameters:DbSelect
Throws ExceptionRuntimeException:
 when an invalid select object is encountered
Return type:array

21.1.1.14. _authenticateValidateResultSet

_authenticateValidateResultSet()

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

Parameters:array
Return type:bool|ZendAuthenticationResult

21.1.1.15. _authenticateValidateResult

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

Parameters:array
Return type:AuthenticationResult

21.1.1.16. _authenticateCreateAuthResult

_authenticateCreateAuthResult()

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

Return type:AuthenticationResult