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