MediaWiki  REL1_24
CLDRPluralRuleConverterOperator Class Reference

Helper for CLDRPluralRuleConverter. More...

Inheritance diagram for CLDRPluralRuleConverterOperator:
Collaboration diagram for CLDRPluralRuleConverterOperator:

List of all members.

Public Member Functions

 __construct ($parser, $name, $pos, $length)
 Initialize a new instance of a CLDRPluralRuleConverterOperator object.
 operate ($left, $right)
 Compute the operation.

Public Attributes

string $name
 The name *.

Static Private Attributes

static $aliasMap
 Map for converting the new operators introduced in Rev 33 to the old forms.
static $opTypes
static $typeSpecMap

Detailed Description

Helper for CLDRPluralRuleConverter.

An operator object, representing a region of the input string (for error messages), and the binary operator at that location.

Definition at line 17 of file CLDRPluralRuleConverterOperator.php.


Constructor & Destructor Documentation

CLDRPluralRuleConverterOperator::__construct ( parser,
name,
pos,
length 
)

Initialize a new instance of a CLDRPluralRuleConverterOperator object.

Parameters:
CLDRPluralRuleConverter$parserThe parser
string$nameThe operator name
int$posThe length
int$length

Definition at line 73 of file CLDRPluralRuleConverterOperator.php.


Member Function Documentation

CLDRPluralRuleConverterOperator::operate ( left,
right 
)

Compute the operation.

Parameters:
CLDRPluralRuleConverterExpression$leftThe left part of the expression
CLDRPluralRuleConverterExpression$rightThe right part of the expression
Returns:
CLDRPluralRuleConverterExpression The result of the operation

Definition at line 88 of file CLDRPluralRuleConverterOperator.php.


Member Data Documentation

CLDRPluralRuleConverterOperator::$aliasMap [static, private]
Initial value:
 array(
        '%' => 'mod',
        '!=' => 'not-in',
        '=' => 'in'
    )

Map for converting the new operators introduced in Rev 33 to the old forms.

Definition at line 59 of file CLDRPluralRuleConverterOperator.php.

string CLDRPluralRuleConverterOperator::$name

The name *.

Definition at line 18 of file CLDRPluralRuleConverterOperator.php.

CLDRPluralRuleConverterOperator::$opTypes [static, private]
Initial value:
 array(
        'or' => 'bbb',
        'and' => 'bbb',
        'is' => 'nnb',
        'is-not' => 'nnb',
        'in' => 'nrb',
        'not-in' => 'nrb',
        'within' => 'nrb',
        'not-within' => 'nrb',
        'mod' => 'nnn',
        ',' => 'rrr',
        '..' => 'nnr',
    )

Definition at line 31 of file CLDRPluralRuleConverterOperator.php.

CLDRPluralRuleConverterOperator::$typeSpecMap [static, private]
Initial value:
 array(
        'b' => 'boolean',
        'n' => 'number',
        'r' => 'range',
    )

Definition at line 50 of file CLDRPluralRuleConverterOperator.php.


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