Skip to content

Commit a801c09

Browse files
committed
Improve documentation of ContentAwareTrait
1 parent 03aaa5c commit a801c09

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

book/controller.rst

100644100755
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,17 @@ itself.
378378

379379
Extending the base class is *optional* in Symfony; it contains useful
380380
shortcuts but nothing mandatory. You can also extend
381-
:class:`Symfony\\Component\\DependencyInjection\\ContainerAware`or use the
382-
:class:`Symfony\\Component\\DependencyInjection\\ContainerAwareTrait` (>= PHP 5.4).
383-
Both provide an implementation to the
384-
:class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface`, making the
385-
service container object accessible via the ``container`` property.
381+
:class:`Symfony\\Component\\DependencyInjection\\ContainerAware`. The service
382+
container object will then be accessible via the ``container`` property.
383+
384+
.. tip::
385+
386+
If your host uses PHP 5.4 or higher, you can also use the
387+
class:`Symfony\\Component\\DependencyInjection\\ContainerAwareTrait` trait to
388+
make the container accessible via the ``container`` property.
389+
390+
.. versionadded:: 2.4
391+
The ``ContainerAwareTrait`` is new in Symfony 2.4
386392

387393
.. note::
388394

0 commit comments

Comments
 (0)