/** * Returns value if it is a valid float value, FALSE otherwise. * * @param mixed $key * @return mixed */ public function testFloat($key) { if (!$this->keyExists($key)) { return false; } if (Zend_Filter::isFloat($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
/** * Returns value if it is a valid float value, FALSE otherwise. * * @param mixed $key * @return mixed */ public function testFloat($key) { if (Zend_Filter::isFloat($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
/** * Returns value if it is a valid float value, FALSE otherwise. * * @param mixed $key * @return mixed */ public function isFloat($key) { return Zend_Filter::isFloat($this->_source[$key]); }
/** * @deprecated since 0.8.0 * @return void */ public function testisFloat() { $this->assertTrue(Zend_Filter::isFloat(1200.0), '"1.2e3" is a valid float number'); $this->assertFalse(Zend_Filter::isFloat('ABC'), '"ABC" is not a valid float number'); }
/** * Returns value if it is a valid float value, FALSE otherwise. * * @param mixed $key * @return mixed */ public function testFloat($key = null) { if (!($value = $this->keyExists($key))) { return false; } if (Zend_Filter::isFloat($value)) { return $value; } return FALSE; }