8000 Removed references of 2.2 by wouterj · Pull Request #3240 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Removed references of 2.2 #3240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added docs for using functions
  • Loading branch information
wouterj committed Nov 29, 2013
commit 0725a8b95a5d9aa7ef38b074f5a16e2cfff74fbd
18 changes: 18 additions & 0 deletions components/expression_language/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,24 @@ JavaScript::

This will print ``Hi Hi Hi!``.

.. _component-expression-functions:

Working with Functions
----------------------

You can also use registered functions in the expression by using the same
syntax as PHP and JavaScript. The ExpressionLanguage component comes with one
function by default: ``constant()`` Which will return the value of the PHP
constant::

define('DB_USER', 'root');

echo $language->evaluate(
'constant("DB_USER")'
);

This will print ``root``.

.. _component-expression-arrays:

Working with Arrays
Expand Down
0