File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
components/expression_language Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -77,17 +77,20 @@ register.
7777
7878 class StringExpressionLanguageProvider implements ExpressionFunctionProviderInterface
7979 {
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+ }
9194 }
9295
9396 You can register providers using
You can’t perform that action at this time.
0 commit comments