Class Zend_Validate_InArray

Description
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Validate/InArray.php (line 36)

Zend_Validate_Abstract
   |
   --Zend_Validate_InArray
Class Constant Summary
 NOT_IN_ARRAY = 'notInArray'
Variable Summary
 array $_haystack
 boolean $_strict
Method Summary
 void __construct ( $haystack, [boolean $strict = false])
 mixed getHaystack ()
 boolean getStrict ()
 boolean isValid (mixed $value)
 Zend_Validate_InArray setStrict (boolean $strict)
Variables
array $_haystack (line 53)

Haystack of possible values

  • access: protected
array $_messageTemplates = array(
self::NOT_IN_ARRAY => "'%value%' was not found in the haystack"
)
(line 44)
  • access: protected

Redefinition of:
Zend_Validate_Abstract::$_messageTemplates
boolean $_strict (line 60)

Whether a strict in_array() invocation is used

  • access: protected

Inherited Variables

Inherited from Zend_Validate_Abstract

Zend_Validate_Abstract::$_errors
Zend_Validate_Abstract::$_messages
Zend_Validate_Abstract::$_messageVariables
Zend_Validate_Abstract::$_value
Methods
Constructor __construct (line 69)

Sets validator options

  • access: public
void __construct ( $haystack, [boolean $strict = false])
  • array $haystack
  • boolean $strict
getHaystack (line 80)

Returns the haystack option

  • access: public
mixed getHaystack ()
getStrict (line 102)

Returns the strict option

  • access: public
boolean getStrict ()
isValid (line 128)

Defined by Zend_Validate_Interface

Returns true if and only if $value is contained in the haystack option. If the strict option is true, then the type of $value is also checked.

  • access: public
boolean isValid (mixed $value)
  • mixed $value
setHaystack (line 91)

Sets the haystack option

  • return: Provides a fluent interface
  • access: public
Zend_Validate_InArray setHaystack ( $haystack)
  • mixed $haystack
setStrict (line 113)

Sets the strict option

  • return: Provides a fluent interface
  • access: public
Zend_Validate_InArray setStrict (boolean $strict)
  • boolean $strict

Inherited Methods

Inherited From Zend_Validate_Abstract

 Zend_Validate_Abstract::getErrors()
 Zend_Validate_Abstract::getMessages()
 Zend_Validate_Abstract::setMessage()
 Zend_Validate_Abstract::setMessages()
 Zend_Validate_Abstract::_createMessage()
 Zend_Validate_Abstract::_error()
 Zend_Validate_Abstract::_setValue()
 Zend_Validate_Abstract::__get()
Class Constants
NOT_IN_ARRAY = 'notInArray' (line 39)

Documentation generated on Sun, 27 May 2007 23:24:56 -0700 by phpDocumentor 1.3.2