Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes

Zend_Validate Class Reference

Inheritance diagram for Zend_Validate:
Zend_Validate_Interface

Public Member Functions

 addValidator (Zend_Validate_Interface $validator, $breakChainOnFailure=false)
 isValid ($value)
 getMessages ()
 getErrors ()

Static Public Member Functions

static getDefaultNamespaces ()
static setDefaultNamespaces ($namespace)
static addDefaultNamespaces ($namespace)
static hasDefaultNamespaces ()
static is ($value, $classBaseName, array $args=array(), $namespaces=array())
static getMessageLength ()
static setMessageLength ($length=-1)

Protected Attributes

 $_validators = array()
 $_messages = array()
 $_errors = array()

Static Protected Attributes

static $_defaultNamespaces = array()

Detailed Description

Definition at line 33 of file Validate.php.


Member Function Documentation

static addDefaultNamespaces ( namespace ) [static]

Adds a new default namespace

Parameters:
array | string$namespace
Returns:
null

Definition at line 168 of file Validate.php.

addValidator ( Zend_Validate_Interface validator,
breakChainOnFailure = false 
)

Adds a validator to the end of the chain

If $breakChainOnFailure is true, then if the validator fails, the next validator in the chain, if one exists, will not be executed.

Parameters:
Zend_Validate_Interface$validator
boolean$breakChainOnFailure
Returns:
Zend_Validate Provides a fluent interface

Definition at line 74 of file Validate.php.

static getDefaultNamespaces (  ) [static]

Returns the set default namespaces

Returns:
array

Definition at line 142 of file Validate.php.

getErrors (  )

Defined by Zend_Validate_Interface

Returns array of validation failure message codes

Returns:
array
Deprecated:
Since 1.5.0

Implements Zend_Validate_Interface.

Definition at line 132 of file Validate.php.

static getMessageLength (  ) [static]

Returns the maximum allowed message length

Returns:
integer

Definition at line 230 of file Validate.php.

getMessages (  )

Defined by Zend_Validate_Interface

Returns array of validation failure messages

Returns:
array

Implements Zend_Validate_Interface.

Definition at line 119 of file Validate.php.

static hasDefaultNamespaces (  ) [static]

Returns true when defaultNamespaces are set

Returns:
boolean

Definition at line 182 of file Validate.php.

static is ( value,
classBaseName,
array $  args = array(),
namespaces = array() 
) [static]
Parameters:
mixed$value
string$classBaseName
array$argsOPTIONAL
mixed$namespacesOPTIONAL
Returns:
boolean
Exceptions:
Zend_Validate_Exception

Definition at line 195 of file Validate.php.

isValid ( value )

Returns true if and only if $value passes all validations in the chain

Validators are run in the order in which they were added to the chain (FIFO).

Parameters:
mixed$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 91 of file Validate.php.

static setDefaultNamespaces ( namespace ) [static]

Sets new default namespaces

Parameters:
array | string$namespace
Returns:
null

Definition at line 153 of file Validate.php.

static setMessageLength ( length = -1 ) [static]

Sets the maximum allowed message length

Parameters:
integer$length

Definition at line 241 of file Validate.php.


The documentation for this class was generated from the following file: