MediaWiki  1.23.2
CLDRPluralRuleConverter_Operator Class Reference

Helper for CLDRPluralRuleConverter. More...

Inheritance diagram for CLDRPluralRuleConverter_Operator:
Collaboration diagram for CLDRPluralRuleConverter_Operator:

Public Member Functions

 __construct ( $parser, $name, $pos, $length)
 Initialize a new instance of a CLDRPluralRuleConverter_Operator object. More...
 
 operate ( $left, $right)
 Compute the operation. More...
 
- Public Member Functions inherited from CLDRPluralRuleConverter_Fragment
 __construct ( $parser, $pos, $length)
 
 error ( $message)
 
 getText ()
 

Public Attributes

string $name
 The name *. More...
 
- Public Attributes inherited from CLDRPluralRuleConverter_Fragment
 $end
 
 $length
 
 $parser
 
 $pos
 

Static Public Attributes

static $aliasMap
 Map for converting the new operators introduced in Rev 33 to the old forms. More...
 
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 18 of file CLDRPluralRuleConverter_Operator.php.

Constructor & Destructor Documentation

◆ __construct()

CLDRPluralRuleConverter_Operator::__construct (   $parser,
  $name,
  $pos,
  $length 
)

Initialize a new instance of a CLDRPluralRuleConverter_Operator object.

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

Definition at line 74 of file CLDRPluralRuleConverter_Operator.php.

References CLDRPluralRuleConverter_Fragment\$length, $name, CLDRPluralRuleConverter_Fragment\$parser, CLDRPluralRuleConverter_Fragment\$pos, and name.

Member Function Documentation

◆ operate()

CLDRPluralRuleConverter_Operator::operate (   $left,
  $right 
)

Compute the operation.

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

Definition at line 89 of file CLDRPluralRuleConverter_Operator.php.

References CLDRPluralRuleConverter_Fragment\$end, CLDRPluralRuleConverter_Fragment\$length, $name, and $right.

Member Data Documentation

◆ $aliasMap

CLDRPluralRuleConverter_Operator::$aliasMap
static
Initial value:
'%' => 'mod',
'!=' => 'not-in',
'=' => 'in'
)

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

Definition at line 60 of file CLDRPluralRuleConverter_Operator.php.

◆ $name

string CLDRPluralRuleConverter_Operator::$name

The name *.

Definition at line 19 of file CLDRPluralRuleConverter_Operator.php.

Referenced by __construct(), and operate().

◆ $opTypes

CLDRPluralRuleConverter_Operator::$opTypes
static
Initial value:
'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 32 of file CLDRPluralRuleConverter_Operator.php.

◆ $typeSpecMap

CLDRPluralRuleConverter_Operator::$typeSpecMap
static
Initial value:
'b' => 'boolean',
'n' => 'number',
'r' => 'range',
)

Definition at line 51 of file CLDRPluralRuleConverter_Operator.php.


The documentation for this class was generated from the following file:
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.