Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbcbf1f3

Browse files
committed
Add documentation for the env DI expresion function
1 parent9c761ac commitbcbf1f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎service_container/expression_language.rst‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ to another service: ``App\Mailer``. One way to do this is with an expression:
7373
7474
To learn more about the expression language syntax, see:doc:`/components/expression_language/syntax`.
7575

76-
In this context, you have access to2 functions:
76+
In this context, you have access to3 functions:
7777

7878
``service``
7979
Returns a given service (see the example above).
8080
``parameter``
8181
Returns a specific parameter value (syntax is like ``service``).
82+
``env``
83+
Returns the value of an env variable.
8284

8385
You also have access to the:class:`Symfony\\Component\\DependencyInjection\\Container`
8486
via a ``container`` variable. Here's another example:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp