Example #1
0
 /**
  * Returns value if it is greater than $min, FALSE otherwise.
  *
  * @param mixed $key
  * @param mixed $min
  * @return mixed
  */
 public function testGreaterThan($key, $min = NULL)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     if (Zend_Filter::isGreaterThan($this->_source[$key], $min)) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Example #2
0
 /**
  * Returns value if it is greater than $min, FALSE otherwise.
  *
  * @param mixed $key
  * @param mixed $min
  * @return mixed
  */
 public function isGreaterThan($key, $min = NULL)
 {
     return Zend_Filter::isGreaterThan($this->_source[$key], $min);
 }
Example #3
0
 /**
  * @deprecated since 0.8.0
  * @return     void
  */
 public function testIsGreaterThan()
 {
     $this->assertTrue(Zend_Filter::isGreaterThan(100, 50), '100 is greater than 50');
     $this->assertFalse(Zend_Filter::isGreaterThan(50, 100), '50 is not greater than 100');
 }
Example #4
0
 /**
  * Returns value if it is greater than $min, FALSE otherwise.
  *
  * @param mixed $key
  * @param mixed $min
  * @return mixed
  */
 public function testGreaterThan($key = null, $min = NULL)
 {
     if (!($value = $this->keyExists($key))) {
         return false;
     }
     if (Zend_Filter::isGreaterThan($value, $min)) {
         return $value;
     }
     return FALSE;
 }