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.
Class for Database record validation
ERROR_NO_RECORD_FOUND = 'noRecordFound'
Error constants
Details ERROR_RECORD_FOUND = 'recordFound'
Detailsunknown_type $_adapter = 'null'Database adapter to use. If null isValid() will use Zend_Db::getInstance instead
Detailsmixed $_exclude = 'null'
Detailsstring $_field = ''
Detailsarray $_messageTemplates = 'array'
Detailsstring $_schema = 'null'
Detailsstring $_table = ''
Details__construct(
array|Zend_Config $options
)
:
Provides basic configuration for use with Zend_Validate_Db Validators Setting $exclude allows a single record to be excluded from matching.
Exclude can either be a String containing a where clause, or an array with field and value keys
to define the where clause added to the sql.
A database adapter may optionally be supplied to avoid using the registered default adapter.
The following option keys are supported: 'table' => The database table to validate against 'schema' => The schema keys 'field' => The field to check for a match 'exclude' => An optional where clause or field/value pair to exclude from the query 'adapter' => An optional database adapter to use
Details_query(
String $value
)
:
ArrayRun query and returns matches, or null if no matches are found.
DetailsgetAdapter(
)
:
Zend_Db_AdapterReturns the set adapter
DetailsgetExclude(
)
:
string|arrayReturns the set exclude clause
DetailsgetField(
)
:
string|arrayReturns the set field
DetailsgetSchema(
)
:
stringReturns the set schema
DetailsgetTable(
)
:
stringReturns the set table
DetailssetAdapter(
Zend_Db_Adapter_Abstract $adapter
)
:
Zend_Validate_Db_AbstractSets a new database adapter
DetailssetExclude(
string|array $exclude
)
:
Zend_Validate_Db_AbstractSets a new exclude clause
DetailssetField(
string $field
)
:
Zend_Validate_Db_AbstractSets a new field
DetailssetSchema(
string $schema
)
:
Zend_Validate_Db_AbstractSets a new schema
DetailssetTable(
string $table
)
:
Zend_Validate_Db_AbstractSets a new table
Details