Class RangeMatcher
RangeMatcher matches a number or the length of a countable
between a lower and upper bound - both of which are inclusive.
-
Peridot\Leo\Matcher\AbstractMatcher
implements
Peridot\Leo\Matcher\MatcherInterface
-
Peridot\Leo\Matcher\CountableMatcher
-
Peridot\Leo\Matcher\RangeMatcher
Methods summary
public
|
#
__construct( integer|float|float $lower, integer|float|float $upper )
|
public
Peridot\Leo\Matcher\Template\TemplateInterface
|
#
getDefaultCountableTemplate( )
Return a default template for when a countable has been set.
Return a default template for when a countable has been set.
Returns
|
public
Peridot\Leo\Matcher\Template\TemplateInterface
|
#
getDefaultTemplate( )
Return a default TemplateInterface if none was set.
Return a default TemplateInterface if none was set.
Returns
|
public
mixed
|
#
setLowerBound( integer $lowerBound )
Set the lower bound of the range matcher.
Set the lower bound of the range matcher.
Parameters
Returns
mixed $this
|
public
mixed
|
#
setUpperBound( integer $upperBound )
Set the upper bound of the range matcher.
Set the upper bound of the range matcher.
Parameters
Returns
mixed $this
|
public
integer
|
#
getLowerBound( )
Return the lower bound of the range matcher.
Return the lower bound of the range matcher.
Returns
integer
|
public
integer
|
#
getUpperBound( )
Return the upper bound of the range matcher.
Return the upper bound of the range matcher.
Returns
integer
|
protected
boolean
|
#
matchNumeric( mixed $number )
Determine if the number is between an upper and lower bound (inclusive).
Determine if the number is between an upper and lower bound (inclusive).
Parameters
Returns
boolean
|