Validate/NotEmpty.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 license@zend.com 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_NotEmpty

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

Constants

>VConstant  BOOLEAN = 1
>VConstant  INTEGER = 2
>VConstant  FLOAT = 4
>VConstant  STRING = 8
>VConstant  ZERO = 16
>VConstant  EMPTY_ARRAY = 32
>VConstant  NULL = 64
>VConstant  PHP = 127
>VConstant  SPACE = 128
>VConstant  OBJECT = 256
>VConstant  OBJECT_STRING = 512
>VConstant  OBJECT_COUNT = 1024
>VConstant  ALL = 2047
>VConstant  INVALID = 'notEmptyInvalid'
>VConstant  IS_EMPTY = 'isEmpty'

Properties

>VPropertyprotected$_constants = array(self::BOOLEAN => 'boolean', self::INTEGER => 'integer', self::FLOAT => 'float', self::STRING => 'string', self::ZERO => 'zero', self::EMPTY_ARRAY => 'array', self::NULL => 'null', self::PHP => 'php', self::SPACE => 'space', self::OBJECT => 'object', self::OBJECT_STRING => 'objectstring', self::OBJECT_COUNT => 'objectcount', self::ALL => 'all')
Default valuearray(self::BOOLEAN => 'boolean', self::INTEGER => 'integer', self::FLOAT => 'float', self::STRING => 'string', self::ZERO => 'zero', self::EMPTY_ARRAY => 'array', self::NULL => 'null', self::PHP => 'php', self::SPACE => 'space', self::OBJECT => 'object', self::OBJECT_STRING => 'objectstring', self::OBJECT_COUNT => 'objectcount', self::ALL => 'all')Details
Type
n/a
>VPropertyprotectedarray $_messageTemplates = array(self::IS_EMPTY => "Value is required and can't be empty", self::INVALID => "Invalid type given. String, integer, float, boolean or array expected")
Default valuearray(self::IS_EMPTY => "Value is required and can't be empty", self::INVALID => "Invalid type given. String, integer, float, boolean or array expected")Details
Type
array
>VPropertyprotectedinteger $_type = 493
Internal type to detect
Default value493Details
Type
integer

Methods

methodpublic__construct(string | array | \Zend_Config $options = null) : void

Constructor

Parameters
NameTypeDescription
$optionsstring | array | \Zend_Config

OPTIONAL

methodpublicgetType() : array

Returns the set types

Returns
TypeDescription
array
methodpublicisValid(string $value) : boolean

Defined by Zend_Validate_Interface

Returns true if and only if $value is not an empty value.
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
boolean
methodpublicsetType(integer | array $type = null) : \Zend_Validate_NotEmpty

Set the types

Parameters
NameTypeDescription
$typeinteger | array
Returns
TypeDescription
\Zend_Validate_NotEmpty
Throws
ExceptionDescription
\Zend_Validate_Exception
Documentation was generated by phpDocumentor 2.2.0 .