Validate.php

Show: PublicProtectedPrivateinherited
Table of Contents
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 [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Validate  
Version
$Id$  

\Zend_Validate

Package: Zend_Validate
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedarray $_defaultNamespaces = array()
static
Default Namespaces
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_errors = array()
Array of validation failure message codes
Default valuearray()Details
Type
array
Deprecated
Since 1.5.0  
>VPropertyprotectedarray $_messages = array()
Array of validation failure messages
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_validators = array()
Validator chain
Default valuearray()Details
Type
array

Methods

methodpublicaddDefaultNamespaces(array | string $namespace) : null
static

Adds a new default namespace

Parameters
NameTypeDescription
$namespacearray | string
Returns
TypeDescription
null
methodpublicaddValidator(\Zend_Validate_Interface $validator, boolean $breakChainOnFailure = false) : \Zend_Validate

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
NameTypeDescription
$validator\Zend_Validate_Interface
$breakChainOnFailureboolean
Returns
TypeDescription
\Zend_ValidateProvides a fluent interface
methodpublicgetDefaultNamespaces() : array
static

Returns the set default namespaces

Returns
TypeDescription
array
methodpublicgetDefaultTranslator( $translator = null) : \Zend_Translate_Adapter | null
static

Returns the default translation object

Parameters
NameTypeDescription
$translator
Returns
TypeDescription
\Zend_Translate_Adapter | null
methodpublicgetErrors() : array

Defined by Zend_Validate_Interface

Returns array of validation failure message codes
Returns
TypeDescription
array
Details
Deprecated
Since 1.5.0  
methodpublicgetMessageLength() : integer
static

Returns the maximum allowed message length

Returns
TypeDescription
integer
methodpublicgetMessages() : array

Defined by Zend_Validate_Interface

Returns array of validation failure messages
Returns
TypeDescription
array
methodpublichasDefaultNamespaces() : boolean
static

Returns true when defaultNamespaces are set

Returns
TypeDescription
boolean
methodpublicis(mixed $value, string $classBaseName, array $args = array(), mixed $namespaces = array()) : boolean
static

Parameters
NameTypeDescription
$valuemixed
$classBaseNamestring
$argsarray

OPTIONAL

$namespacesmixed

OPTIONAL

Returns
TypeDescription
boolean
Throws
ExceptionDescription
\Zend_Validate_Exception
methodpublicisValid(mixed $value) : boolean

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
NameTypeDescription
$valuemixed
Returns
TypeDescription
boolean
methodpublicsetDefaultNamespaces(array | string $namespace) : null
static

Sets new default namespaces

Parameters
NameTypeDescription
$namespacearray | string
Returns
TypeDescription
null
methodpublicsetDefaultTranslator(\Zend_Translate | \Zend_Translate_Adapter | null $translator = null) : void
static

Sets a default translation object for all validation objects

Parameters
NameTypeDescription
$translator\Zend_Translate | \Zend_Translate_Adapter | null
methodpublicsetMessageLength(integer $length = -1) : void
static

Sets the maximum allowed message length

Parameters
NameTypeDescription
$lengthinteger
Documentation was generated by phpDocumentor 2.2.0 .