Overview

Namespaces

  • None
  • Peridot
    • Leo
      • Formatter
      • Interfaces
        • Assert
      • Matcher
        • Template
      • ObjectPath
      • Responder
  • PHP

Classes

  • AbstractMatcher
  • CountableMatcher
  • EmptyMatcher
  • EqualMatcher
  • ExceptionMatcher
  • GreaterThanMatcher
  • GreaterThanOrEqualMatcher
  • InclusionMatcher
  • InstanceofMatcher
  • KeysMatcher
  • LengthMatcher
  • LessThanMatcher
  • LessThanOrEqualMatcher
  • Match
  • NullMatcher
  • PatternMatcher
  • PredicateMatcher
  • PropertyMatcher
  • RangeMatcher
  • SameMatcher
  • SubStringMatcher
  • TrueMatcher
  • TruthyMatcher
  • TypeMatcher

Interfaces

  • MatcherInterface
  • Overview
  • Namespace
  • Class
  • Tree

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
Extended by Peridot\Leo\Matcher\CountableMatcher
Extended by Peridot\Leo\Matcher\RangeMatcher
Namespace: Peridot\Leo\Matcher
Package: Peridot\Leo\Matcher
Located at Matcher/RangeMatcher.php
Methods summary
public
# __construct( integer|float|float $lower, integer|float|float $upper )

Parameters

$lower
$upper

Overrides

Peridot\Leo\Matcher\AbstractMatcher::__construct()
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

Peridot\Leo\Matcher\Template\TemplateInterface
public Peridot\Leo\Matcher\Template\TemplateInterface
# getDefaultTemplate( )

Return a default TemplateInterface if none was set.

Return a default TemplateInterface if none was set.

Returns

Peridot\Leo\Matcher\Template\TemplateInterface
public mixed
# setLowerBound( integer $lowerBound )

Set the lower bound of the range matcher.

Set the lower bound of the range matcher.

Parameters

$lowerBound

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

$upperBound

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

$number

Returns

boolean
Methods inherited from Peridot\Leo\Matcher\CountableMatcher
doMatch(), getCount(), getCountable(), getTemplate(), setCountable()
Methods inherited from Peridot\Leo\Matcher\AbstractMatcher
invert(), isNegated(), match(), setAssertion(), setTemplate()
Properties summary
protected integer $lowerBound
#
protected integer $upperBound
#
Properties inherited from Peridot\Leo\Matcher\CountableMatcher
$countable
Properties inherited from Peridot\Leo\Matcher\AbstractMatcher
$assertion, $expected, $negated, $template
Leo API documentation generated by ApiGen