We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89cba1e commit 6d9af37Copy full SHA for 6d9af37
components/expression_language/extending.rst
@@ -90,6 +90,17 @@ register.
90
}
91
92
93
+.. tip::
94
+
95
+ You can create an expression expression from a PHP function with the
96
+ :method:`Symfony\\Component\\ExpressionLanguage\\ExpressionFunction::fromPhp` static method::
97
98
+ ExpressionFunction::fromPhp('strtoupper');
99
100
+ It allows namespaced PHP function where second parameter must be set to name expression::
101
102
+ ExpressionFunction::fromPhp('My\strtoupper', 'my_strtoupper');
103
104
You can register providers using
105
:method:`Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage::registerProvider`
106
or by using the second argument of the constructor::
0 commit comments