API Documentation

Validate/Db/Abstract.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_Validate
version
$Id: Abstract.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_Db_Abstract

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_Validate_Db_Abstract

Extends from
Zend_Validate_Abstract
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_Validate
uses
Zend_Validate_Abstract
Constants
ERROR_NO_RECORD_FOUND
ERROR_RECORD_FOUND
Properties
$_messageTemplates
$_schema
$_table
$_field
$_exclude
$_adapter
Methods
__construct
getAdapter
setAdapter
getExclude
setExclude
getField
setField
getTable
setTable
getSchema
setSchema
_query

Description

Class for Database record validation

Constants

ERROR_NO_RECORD_FOUND

 ERROR_NO_RECORD_FOUND = 'noRecordFound'

Error constants

Details

value
noRecordFound

ERROR_RECORD_FOUND

 ERROR_RECORD_FOUND = 'recordFound'

Details

value
recordFound

Properties

$_adapter

unknown_type $_adapter = 'null'

Database adapter to use. If null isValid() will use Zend_Db::getInstance instead

Details

$_adapter
unknown_type
visibility
protected
default
null
final
false
static
false

$_exclude

mixed $_exclude = 'null'

Details

$_exclude
mixed
visibility
protected
default
null
final
false
static
false

$_field

string $_field = ''

Details

$_field
string
visibility
protected
default
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Details

$_messageTemplates
array
Message templates
visibility
protected
default
array
final
false
static
false

$_schema

string $_schema = 'null'

Details

$_schema
string
visibility
protected
default
null
final
false
static
false

$_table

string $_table = ''

Details

$_table
string
visibility
protected
default
final
false
static
false

Methods

__construct

__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

Arguments
$options
arrayZend_Config
Options to use for this validator
Details
visibility
public
final
false
static
false

_query

_query( String $value ) : Array

Run query and returns matches, or null if no matches are found.

Arguments
$value
String
Output
Array
when matches are found.
Details
visibility
protected
final
false
static
false

getAdapter

getAdapter( ) : Zend_Db_Adapter

Returns the set adapter

Output
Zend_Db_Adapter
Details
visibility
public
final
false
static
false

getExclude

getExclude( ) : string|array

Returns the set exclude clause

Output
string|array
Details
visibility
public
final
false
static
false

getField

getField( ) : string|array

Returns the set field

Output
string|array
Details
visibility
public
final
false
static
false

getSchema

getSchema( ) : string

Returns the set schema

Output
string
Details
visibility
public
final
false
static
false

getTable

getTable( ) : string

Returns the set table

Output
string
Details
visibility
public
final
false
static
false

setAdapter

setAdapter( Zend_Db_Adapter_Abstract $adapter ) : Zend_Validate_Db_Abstract

Sets a new database adapter

Arguments
$adapter
Zend_Db_Adapter_Abstract
Details
visibility
public
final
false
static
false

setExclude

setExclude( string|array $exclude ) : Zend_Validate_Db_Abstract

Sets a new exclude clause

Arguments
$exclude
stringarray
Details
visibility
public
final
false
static
false

setField

setField( string $field ) : Zend_Validate_Db_Abstract

Sets a new field

Arguments
$field
string
Details
visibility
public
final
false
static
false

setSchema

setSchema( string $schema ) : Zend_Validate_Db_Abstract

Sets a new schema

Arguments
$schema
string
Details
visibility
public
final
false
static
false

setTable

setTable( string $table ) : Zend_Validate_Db_Abstract

Sets a new table

Arguments
$table
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.