__construct() public method

Sets the value to compare against and the fuzziness of the match. Used for comparing floating point values.
public __construct ( mixed $value, mixed $margin, string $message = '%s' )
$value mixed Test value to not match.
$margin mixed Fuzziness of match.
$message string Customised message on failure.
Beispiel #1
0
 /**
  *    Sets the range of (inclusive) values to compare against.
  *    Used for comparing floating point and integer values.
  *    @param mixed $minimum      Lowest within-range value.
  *    @param mixed $maximum      Highest within-range value.
  *    @param string $message     Customised message on failure.
  *    @access public
  */
 function __construct($minimum, $maximum, $message = '%s')
 {
     parent::__construct($minimum, $maximum, $message);
     $this->upper = $maximum;
     $this->lower = $minimum;
 }