3 class Haanga_Extension_Filter_Pluralize
5 static function generator($compiler, $args)
7 if (count($args) > 1) {
8 if (!Haanga_AST
::is_str($args[1])) {
9 throw new Haanga_Compiler_Exception("pluralize: First parameter must be an string");
11 $parts = explode(",", $args[1]['string']);
13 if (count($parts) == 1) {
16 $singular = $parts[0];
24 return hexpr_cond(hexpr($args[0], '<=', 1), $singular, $plural);