@@ -5,18 +5,18 @@ Extending the ExpressionLanguage
5
5
================================
6
6
7
7
The ExpressionLanguage can be extended by adding custom functions. For
8
- instance, in the framework , the security has custom functions to check the
9
- user's role.
8
+ instance, in the Symfony Framework , the security has custom functions to check
9
+ the user's role.
10
10
11
11
.. note ::
12
12
13
13
If you want to learn how to use functions in an expression, read
14
14
":ref: `component-expression-functions `".
15
15
16
- Register Functions
17
- ------------------
16
+ Registering Functions
17
+ ---------------------
18
18
19
- Functions will be registered on the current ``ExpressionLanguage `` instance.
19
+ Functions are registered on each specific ``ExpressionLanguage `` instance.
20
20
That means the functions can be used in any expression executed by that
21
21
instance.
22
22
@@ -52,13 +52,12 @@ This method has 3 arguments:
52
52
53
53
This will print ``hello ``.
54
54
55
- Creating a new ExpressionLanguage class
55
+ Creating a new ExpressionLanguage Class
56
56
---------------------------------------
57
57
58
58
When you use the ``ExpressionLanguage `` class in your library, it's recommend
59
59
to create a new ``ExpressionLanguage `` class and register the functions there.
60
- The class will execute ``registerFunctions `` to register the default
61
- functions, you can override this to also add your own functions::
60
+ Override ``registerFunctions `` to add your own functions::
62
61
63
62
namespace Acme\AwesomeLib\ExpressionLanguage;
64
63
0 commit comments