Esempio n. 1
0
 /**
  * Returns value if it is one of $allowed, FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function isOneOf($key, $allowed = NULL)
 {
     return Zend_Filter::isOneOf($this->_source[$key], $allowed);
 }
Esempio n. 2
0
 /**
  * Returns value if it is one of $allowed, FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testOneOf($key, $allowed = NULL)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     if (Zend_Filter::isOneOf($this->_source[$key], $allowed)) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Esempio n. 3
0
 /**
  * Returns value if it is one of $allowed, FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testOneOf($key = null, $allowed = NULL)
 {
     if (!($value = $this->keyExists($key))) {
         return false;
     }
     if (Zend_Filter::isOneOf($value, $allowed)) {
         return $value;
     }
     return FALSE;
 }