@@ -10,22 +10,22 @@ The ExpressionLanguage Component
10
10
(mostly, but not limited to, Booleans).
11
11
12
12
.. versionadded :: 2.4
13
- The ExpressionLanguage component was added in Symfony 2.4.
13
+ The ExpressionLanguage component was introduced in Symfony 2.4.
14
14
15
15
Installation
16
16
------------
17
17
18
18
You can install the component in 2 different ways:
19
19
20
- * :doc: `Install it via Composer </components/using_components >` (``symfony/expression-language `` on `Packagist `_).
21
- * Use the official Git repository (https://github.com/symfony/expression-language);
20
+ * :doc: `Install it via Composer </components/using_components >` (``symfony/expression-language `` on `Packagist `_);
21
+ * Use the official Git repository (https://github.com/symfony/expression-language).
22
22
23
23
How can the Expression Engine Help Me?
24
24
--------------------------------------
25
25
26
26
The purpose of the component is to allow users to use expressions inside
27
- configuration for more complex logic. In the Symfony2 Framework, for example,
28
- expressions can be used in security, for validation rules, and in route matching.
27
+ configuration for more complex logic. For some examples, the Symfony2 Framework
28
+ uses expressions in security, for validation rules and in route matching.
29
29
30
30
Besides using the component in the framework itself, the ExpressionLanguage
31
31
component is a perfect candidate for the foundation of a *business rule engine *.
@@ -52,15 +52,15 @@ Usage
52
52
53
53
The ExpressionLanguage component can compile and evaluate expressions.
54
54
Expressions are one-liners that often return a Boolean, which can be used
55
- by the code executing the expression in an ``if `` statements . A simple example
55
+ by the code executing the expression in an ``if `` statement . A simple example
56
56
of an expression is ``1 + 2 ``. You can also use more complicated expressions,
57
57
such as ``someArray[3].someMethod('bar') ``.
58
58
59
59
The component provides 2 ways to work with expressions:
60
60
61
+ * **evaluation **: the expression is evaluated without being compiled to PHP;
61
62
* **compile **: the expression is compiled to PHP, so it can be cached and
62
- evaluated;
63
- * **evaluation **: the expression is evaluated without being compiled to PHP.
63
+ evaluated.
64
64
65
65
The main class of the component is
66
66
:class: `Symfony\\ Component\\ ExpressionLanguage\\ ExpressionLanguage `::
0 commit comments