## Zend_Validate_InArray

Description

Implements interfaces:

- Zend_Validate_Interface

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

Located in /Zend/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 setHaystack ( $haystack)
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 Wed, 21 Feb 2007 11:51:46 -0800 by phpDocumentor 1.3.1