/** * 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; }
/** * 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; }
/** * 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]); }
/** * @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'); }
/** * 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; }