Esempio n. 1
0
 /**
  * Returns value if it is a valid IP format, FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testIp($key)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     if (Zend_Filter::isIp($this->_source[$key])) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Esempio n. 2
0
 /**
  * Returns value if it is a valid IP format, FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function isIp($key)
 {
     return Zend_Filter::isIp($this->_source[$key]);
 }
Esempio n. 3
0
 /**
  * Returns value if it is a valid IP format, FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testIp($key)
 {
     if (Zend_Filter::isIp($this->_source[$key])) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Esempio n. 4
0
 /**
  * Returns value if it is a valid IP format, FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testIp($key = null)
 {
     if (!($value = $this->keyExists($key))) {
         return false;
     }
     if (Zend_Filter::isIp($value)) {
         return $value;
     }
     return FALSE;
 }