MediaWiki  REL1_24
CLDRPluralRuleEvaluatorRange Class Reference

Evaluator helper class representing a range list. More...

Collaboration diagram for CLDRPluralRuleEvaluatorRange:

List of all members.

Public Member Functions

 __construct ($start, $end=false)
 Initialize a new instance of CLDRPluralRuleEvaluatorRange.
 __toString ()
 Returns the string representation of the rule evaluator range.
 add ($other)
 Add another part to this 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.

Public Attributes

array $parts = array()
 The parts.

Detailed Description

Evaluator helper class representing a range list.

Definition at line 15 of file CLDRPluralRuleEvaluatorRange.php.


Constructor & Destructor Documentation

Initialize a new instance of CLDRPluralRuleEvaluatorRange.

Parameters:
int$startThe start of the range
int | bool$endThe end of the range, or false if the range is not bounded.

Definition at line 28 of file CLDRPluralRuleEvaluatorRange.php.


Member Function Documentation

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

Definition at line 93 of file CLDRPluralRuleEvaluatorRange.php.

Add another part to this range.

Parameters:
CLDRPluralRuleEvaluatorRange | int$otherThe part to add, either a range object itself or a single number.

Definition at line 79 of file CLDRPluralRuleEvaluatorRange.php.

CLDRPluralRuleEvaluatorRange::isNumberIn ( number,
integerConstraint = true 
)

Determine if the given number is inside the range.

Parameters:
int$numberThe number to check
bool$integerConstraintIf 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.

Definition at line 44 of file CLDRPluralRuleEvaluatorRange.php.

Readable alias for isNumberIn( $number, false ), and the implementation of the "within" operator.

Parameters:
int$numberThe number to check
Returns:
bool True if the number is inside the range; otherwise, false.

Definition at line 69 of file CLDRPluralRuleEvaluatorRange.php.


Member Data Documentation

array CLDRPluralRuleEvaluatorRange::$parts = array()

The parts.

Definition at line 20 of file CLDRPluralRuleEvaluatorRange.php.


The documentation for this class was generated from the following file: