Auth/Adapter/DbTable.php
- 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
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

boolean $_ambiguityIdentity = falsefalseDetails- Type
- boolean

string $_credentialColumn = nullnullDetails- Type
- string

string $_credentialTreatment = nullnullDetails- Type
- string

string $_identityColumn = nullnullDetails- Type
- string

array $_resultRow = nullnullDetails- Type
- array
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
| Name | Type | Description |
|---|---|---|
| $zendDb | \Zend_Db_Adapter_Abstract | If null, default database adapter assumed |
| $tableName | string | |
| $identityColumn | string | |
| $credentialColumn | string | |
| $credentialTreatment | string |

_authenticateCreateAuthResult() : \Zend_Auth_Result_authenticateCreateAuthResult() - Creates a Zend_Auth_Result object from the information that has been collected during the authenticate() attempt.
| Type | Description |
|---|---|
| \Zend_Auth_Result |

_authenticateCreateSelect() : \Zend_Db_Select_authenticateCreateSelect() - This method creates a Zend_Db_Select object that is completely configured to be queried against the database.
| Type | Description |
|---|---|
| \Zend_Db_Select |

_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.
| Name | Type | Description |
|---|---|---|
| $dbSelect | \Zend_Db_Select |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Auth_Adapter_Exception | - when an invalid select object is encountered |

_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.
| Type | Description |
|---|---|
| true |
| Exception | Description |
|---|---|
| \Zend_Auth_Adapter_Exception | - in the event that setup was not done properly |

_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.
| Name | Type | Description |
|---|---|---|
| $resultIdentity | array |
| Type | Description |
|---|---|
| \Zend_Auth_Result |

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

_setDbAdapter( $zendDb = null) : \Zend_Auth_Adapter_DbTable_setDbAdapter() - set the database adapter to be used for quering
| Name | Type | Description |
|---|---|---|
| $zendDb |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable |
| Exception | Description |
|---|---|
| \Zend_Auth_Adapter_Exception |

authenticate() : \Zend_Auth_Resultauthenticate() - 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.
| Type | Description |
|---|---|
| \Zend_Auth_Result |
| Exception | Description |
|---|---|
| \Zend_Auth_Adapter_Exception | if answering the authentication query is impossible |

getAmbiguityIdentity() : boolgetAmbiguityIdentity() - returns TRUE for usage of multiple identical identies with different credentials, FALSE if not used.
| Type | Description |
|---|---|
| bool |

getDbSelect() : \Zend_Db_SelectgetDbSelect() - Return the preauthentication Db Select object for userland select query modification
| Type | Description |
|---|---|
| \Zend_Db_Select |

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

setAmbiguityIdentity(int | bool $flag) : \Zend_Auth_Adapter_DbTablesetAmbiguityIdentity() - sets a flag for usage of identical identities with unique credentials. It accepts integers (0, 1) or boolean (true, false) parameters. Default is false.
| Name | Type | Description |
|---|---|---|
| $flag | int | bool |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable |

setCredential(string $credential) : \Zend_Auth_Adapter_DbTablesetCredential() - 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(?)'
| Name | Type | Description |
|---|---|---|
| $credential | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable | Provides a fluent interface |

setCredentialColumn(string $credentialColumn) : \Zend_Auth_Adapter_DbTablesetCredentialColumn() - set the column name to be used as the credential column
| Name | Type | Description |
|---|---|---|
| $credentialColumn | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable | Provides a fluent interface |

setCredentialTreatment(string $treatment) : \Zend_Auth_Adapter_DbTablesetCredentialTreatment() - allows the developer to pass a parameterized string that is used to transform or treat the input credential data.
| Name | Type | Description |
|---|---|---|
| $treatment | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable | Provides a fluent interface |

setIdentity(string $value) : \Zend_Auth_Adapter_DbTablesetIdentity() - set the value to be used as the identity
| Name | Type | Description |
|---|---|---|
| $value | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable | Provides a fluent interface |

setIdentityColumn(string $identityColumn) : \Zend_Auth_Adapter_DbTablesetIdentityColumn() - set the column name to be used as the identity column
| Name | Type | Description |
|---|---|---|
| $identityColumn | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable | Provides a fluent interface |

setTableName(string $tableName) : \Zend_Auth_Adapter_DbTablesetTableName() - set the table name to be used in the select query
| Name | Type | Description |
|---|---|---|
| $tableName | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_DbTable | Provides a fluent interface |