25 #require_once 'Zend/Validate/Abstract.php'; 41 self::NOT_IN_ARRAY =>
"'%value%' was not found in the haystack",
76 #require_once 'Zend/Validate/Exception.php'; 82 $temp[
'haystack'] = func_get_arg(0);
83 $temp[
'strict'] = func_get_arg(1);
86 $temp = func_get_arg(0);
87 if (!array_key_exists(
'haystack',
$options)) {
97 if (array_key_exists(
'strict',
$options)) {
101 if (array_key_exists(
'recursive',
$options)) {
124 $this->_haystack = $haystack;
146 $this->_strict = (boolean) $strict;
168 $this->_recursive = (boolean) $recursive;
185 $iterator =
new RecursiveIteratorIterator(
new RecursiveArrayIterator($this->_haystack));
187 if ($this->_strict) {
196 if (in_array(
$value, $this->_haystack, $this->_strict)) {
201 $this->
_error(self::NOT_IN_ARRAY);
setHaystack(array $haystack)
_error($messageKey, $value=null)