File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/Symfony/Component/ExpressionLanguage Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,18 @@ public function parse($expression, $names)
92
92
/**
93
93
* Registers a function.
94
94
*
95
+ * A function is defined by two PHP callables. The callables are used
96
+ * by the language to compile and/or evaluate the function.
97
+ *
98
+ * The first function is used at compilation time and must return a
99
+ * PHP representation of the function call (it receives the function
100
+ * arguments as arguments).
101
+ *
102
+ * The second function is used for expression evaluation and must return
103
+ * the value of the function call based on the values defined for the
104
+ * expression (it receives the values as a first argument and the function
105
+ * arguments as remaining arguments).
106
+ *
95
107
* @param string $name The function name
96
108
* @param callable $compiler A callable able to compile the function
97
109
* @param callable $evaluator A callable able to evaluate the function
You can’t perform that action at this time.
0 commit comments