Evaluator helper class representing a range list.
More...
|
| __construct ( $start, $end=false) |
| Initialize a new instance of Range.
|
|
| isNumberIn ( $number, $integerConstraint=true) |
| Determine if the given number is inside the range.
|
|
| isNumberWithin ( $number) |
| Readable alias for isNumberIn( $number, false ), and the implementation of the "within" operator.
|
|
| add ( $other) |
| Add another part to this range.
|
|
| __toString () |
| Returns the string representation of the rule evaluator range.
|
|
Evaluator helper class representing a range list.
◆ __construct()
CLDRPluralRuleParser\Range::__construct |
( |
| $start, |
|
|
| $end = false ) |
Initialize a new instance of Range.
- Parameters
-
int | $start | The start of the range |
int | bool | $end | The end of the range, or false if the range is not bounded. |
◆ __toString()
CLDRPluralRuleParser\Range::__toString |
( |
| ) |
|
Returns the string representation of the rule evaluator range.
The purpose of this method is to help debugging.
- Returns
- string The string representation of the rule evaluator range
◆ add()
CLDRPluralRuleParser\Range::add |
( |
| $other | ) |
|
Add another part to this range.
- Parameters
-
Range | int | $other | The part to add, either a range object itself or a single number. |
◆ isNumberIn()
CLDRPluralRuleParser\Range::isNumberIn |
( |
| $number, |
|
|
| $integerConstraint = true ) |
Determine if the given number is inside the range.
- Parameters
-
int | $number | The number to check |
bool | $integerConstraint | If true, also asserts the number is an integer; otherwise, number simply has to be inside the range. |
- Returns
- bool True if the number is inside the range; otherwise, false.
◆ isNumberWithin()
CLDRPluralRuleParser\Range::isNumberWithin |
( |
| $number | ) |
|
Readable alias for isNumberIn( $number, false ), and the implementation of the "within" operator.
- Parameters
-
int | $number | The number to check |
- Returns
- bool True if the number is inside the range; otherwise, false.
The documentation for this class was generated from the following file: