File tree 1 file changed +14
-11
lines changed
components/expression_language
1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -77,17 +77,20 @@ register.
77
77
78
78
class StringExpressionLanguageProvider implements ExpressionFunctionProviderInterface
79
79
{
80
- return array(
81
- new ExpressionFunction('lowercase', function ($str) {
82
- return sprintf('(is_string(%1$s) ? strtolower(%1$s) : %1$s)', $str);
83
- }, function ($arguments, $str) {
84
- if (!is_string($str)) {
85
- return $str;
86
- }
87
-
88
- return strtolower($str);
89
- });
90
- );
80
+ public function getFunctions()
81
+ {
82
+ return array(
83
+ new ExpressionFunction('lowercase', function ($str) {
84
+ return sprintf('(is_string(%1$s) ? strtolower(%1$s) : %1$s)', $str);
85
+ }, function ($arguments, $str) {
86
+ if (!is_string($str)) {
87
+ return $str;
88
+ }
89
+
90
+ return strtolower($str);
91
+ }),
92
+ );
93
+ }
91
94
}
92
95
93
96
You can register providers using
You can’t perform that action at this time.
0 commit comments