Example #1
0
 /**
  * Returns value if it is a valid hexadecimal format, FALSE
  * otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testHex($key)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     if (Zend_Filter::isHex($this->_source[$key])) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Example #2
0
 /**
  * Returns value if it is a valid hexadecimal format, FALSE
  * otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testHex($key)
 {
     if (Zend_Filter::isHex($this->_source[$key])) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Example #3
0
 /**
  * Returns value if it is a valid hexadecimal format, FALSE
  * otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function isHex($key)
 {
     return Zend_Filter::isHex($this->_source[$key]);
 }
Example #4
0
 /**
  * @deprecated since 0.8.0
  * @return     void
  */
 public function testisHex()
 {
     $this->assertTrue(Zend_Filter::isHex('AB10BC99'), '"AB10BC99" is a valid hex number');
     $this->assertFalse(Zend_Filter::isHex('ABK'), '"ABK" is not a valid hex number');
 }
Example #5
0
 /**
  * Returns value if it is a valid hexadecimal format, FALSE
  * otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testHex($key = null)
 {
     if (!($value = $this->keyExists($key))) {
         return false;
     }
     if (Zend_Filter::isHex($value)) {
         return $value;
     }
     return FALSE;
 }