|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
A helper class that handles a single category rules (eg 'zero', 'one', ...) and its formula and examples. More...
Collaboration diagram for Gettext\Languages\Category:Public Member Functions | |
| __construct ($cldrCategoryId, $cldrFormulaAndExamples) | |
| Initialize the instance and parse the formula. More... | |
| getExampleIntegers () | |
| Return a list of numbers corresponding to the $examples value. More... | |
Static Public Member Functions | |
| static | expandExamples ($examples) |
| Expand a list of examples as defined by CLDR. More... | |
Data Fields | |
| $id | |
| $formula | |
| $examples | |
A helper class that handles a single category rules (eg 'zero', 'one', ...) and its formula and examples.
Definition at line 9 of file Category.php.
| Gettext\Languages\Category::__construct | ( | $cldrCategoryId, | |
| $cldrFormulaAndExamples | |||
| ) |
Initialize the instance and parse the formula.
| string | $cldrCategoryId | The CLDR category identifier (eg 'pluralRule-count-one'). |
| string | $cldrFormulaAndExamples | The CLDR formula and examples (eg 'i = 1 and v = 0 @integer 1'). |
| Exception |
Definition at line 32 of file Category.php.
References Gettext\Languages\CldrData\$categories, $s, Gettext\Languages\FormulaConverter\convertFormula(), and Gettext\Languages\CldrData\OTHER_CATEGORY.
Here is the call graph for this function:
|
static |
Expand a list of examples as defined by CLDR.
| string | $examples | A string like '1, 2, 5...7, …'. |
| Exception | Throws an Exception if we weren't able to expand $examples. |
Definition at line 79 of file Category.php.
References Gettext\Languages\Category\$examples, $from, $i, $m, and $result.
Referenced by Gettext\Languages\Category\getExampleIntegers().
Here is the caller graph for this function:| Gettext\Languages\Category::getExampleIntegers | ( | ) |
Return a list of numbers corresponding to the $examples value.
| Exception | Throws an Exception if we weren't able to expand the examples. |
Definition at line 69 of file Category.php.
References Gettext\Languages\Category\expandExamples().
Here is the call graph for this function:| Gettext\Languages\Category::$examples |
Definition at line 25 of file Category.php.
Referenced by Gettext\Languages\Category\expandExamples().
| Gettext\Languages\Category::$formula |
Definition at line 20 of file Category.php.
| Gettext\Languages\Category::$id |
Definition at line 15 of file Category.php.