Class Zend_Validate_InArray

Description

Implements interfaces:

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

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


	
			
Variable Summary
 array $_haystack
 array $_messages
 boolean $_strict
Method Summary
 void __construct ( $haystack, [boolean $strict = false])
 mixed getHaystack ()
 array getMessages ()
 boolean getStrict ()
 boolean isValid (mixed $value)
 Zend_Validate_InArray setStrict (boolean $strict)
Variables
array $_haystack (line 43)

Haystack of possible values

  • access: protected
array $_messages = array() (line 57)

Array of validation failure messages

  • access: protected
boolean $_strict (line 50)

Whether a strict in_array() invocation is used

  • access: protected
Methods
Constructor __construct (line 66)

Sets validator options

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

Returns the haystack option

  • access: public
mixed getHaystack ()
getMessages (line 142)

Defined by Zend_Validate_Interface

Returns array of validation failure messages

  • access: public
array getMessages ()

Implementation of:
Zend_Validate_Interface::getMessages()
Returns an array of messages that explain why a previous isValid() call returned false
getStrict (line 99)

Returns the strict option

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

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

Implementation of:
Zend_Validate_Interface::isValid()
Returns true if and only if $value meets the validation requirements
setHaystack (line 88)

Sets the haystack option

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

Sets the strict option

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

Documentation generated on Sat, 05 May 2007 11:55:44 -0700 by phpDocumentor 1.3.2