Skip to content

Commit 1112cc2

Browse files
committed
Merge branch 'patch-1' of github.com:endroid/symfony-docs into endroid-patch-1
2 parents 5f69c8f + a801c09 commit 1112cc2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

book/controller.rst

100644100755
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,15 @@ itself.
395395
:class:`Symfony\\Component\\DependencyInjection\\ContainerAware`. The service
396396
container object will then be accessible via the ``container`` property.
397397

398+
.. tip::
399+
400+
If your host uses PHP 5.4 or higher, you can also use the
401+
class:`Symfony\\Component\\DependencyInjection\\ContainerAwareTrait` trait to
402+
make the container accessible via the ``container`` property.
403+
404+
.. versionadded:: 2.4
405+
The ``ContainerAwareTrait`` is new in Symfony 2.4
406+
398407
.. note::
399408

400409
You can also define your :doc:`Controllers as Services</cookbook/controller/service>`.

0 commit comments

Comments
 (0)