示例#1
0
 public function testCalculateRangeCutter()
 {
     $this->assertEquals(array("813 K5870", "813 K5880"), Dewey::calculateRange("813 K587*"), "Range should work with cutters");
 }
示例#2
0
 /**
  *  does this call number fall between the ranges specified? can use
  *  DDS call number string or a Dewey\CallNumber object
  *
  *  @param  mixed       either a range string (using `x` to denote the area of range, or a tuple of min/max)
  *  @param  boolean     whether to include $max in equation  (true for LTEQ, false for LT)
  *  @return boolean 
  */
 public function inRange($range, $lessThanEqualTo = true)
 {
     if (is_string($range)) {
         $range = \Dewey::calculateRange($range);
     }
     list($min, $max) = $range;
     return $this->greaterThanEqualTo($min) && (!!$lessThanEqualTo === true ? $this->lessThanEqualTo($max) : $this->lessThan($max));
 }