@@ -14,19 +14,20 @@ public function getFunctions(): array
1414 return [
1515 ExpressionFunction::fromPhp ('sprintf ' , 'format ' ),
1616 ExpressionFunction::fromPhp ('trim ' , 'trim ' ),
17- ExpressionFunction:: fromPhp ( ' ucfirst ' , 'capitalize ' ),
18- ExpressionFunction:: fromPhp ( ' strtolower ' , 'toLowerCase ' ),
17+ new Capitalize ( 'capitalize ' ),
18+ new ToLowerCase ( 'toLowerCase ' ),
1919 ExpressionFunction::fromPhp ('mb_substr ' , 'search ' ),
20- ExpressionFunction:: fromPhp ( ' strtoupper ' , 'toUpperCase ' ),
20+ new ToUpperCase ( 'toUpperCase ' ),
2121 ExpressionFunction::fromPhp ('number_format ' , 'formatNumber ' ),
2222 ExpressionFunction::fromPhp ('strpos ' , 'indexOf ' ),
2323 ExpressionFunction::fromPhp ('str_replace ' , 'replace ' ),
2424 ExpressionFunction::fromPhp ('strip_tags ' , 'stripHtml ' ),
2525 ExpressionFunction::fromPhp ('json_decode ' , 'decode ' ),
2626 ExpressionFunction::fromPhp ('preg_replace ' , 'replaceByExpression ' ),
27- ExpressionFunction:: fromPhp ( ' ucwords ' , 'capitalizeWords ' ),
27+ new CapitalizeWords ( 'capitalizeWords ' ),
2828 ExpressionFunction::fromPhp ('rtrim ' , 'removeWhitespaces ' ),
2929 ExpressionFunction::fromPhp ('explode ' , 'splitIntoArray ' ),
30+ new Truncate ('truncate ' ),
3031 new FileName ('fileName ' ),
3132 new DateTime ('dateTime ' ),
3233 new FormatDate ('formatDate ' ),
0 commit comments