Skip to content

Commit 759e9b2

Browse files
committed
last tweaks from feedback
1 parent 45500b3 commit 759e9b2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

service_container.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ the service container *how* to instantiate it:
142142
// app/config/services.php
143143
TODO
144144
145-
That's it! Thanks to the ``AppBundle\`` line and ``resource`` key below it, all
146-
classes in the ``src/AppBundle/Service`` directory (and a few other directories)
147-
will automatically be added to the container.
145+
That's it! Thanks to the ``AppBundle\`` line and ``resource`` key below it, a service
146+
will be registered for each class in the ``src/AppBundle/Service`` directory (and
147+
the other directories listed).
148148

149149
Each service's "key" is its class name. You can use it immediately inside your controller::
150150

@@ -210,11 +210,11 @@ and set it on a ``$logger`` property::
210210
}
211211

212212
That's it! The container will *automatically* know to pass the ``logger`` service
213-
when instantiating the ``MessageGenerator``? How does it know to do this?
213+
when instantiating the ``MessageGenerator``. How does it know to do this?
214214
:doc:`Autowiring </service_container/autowiring>`. The key is the ``LoggerInterface``
215215
type-hint in your ``__construct()`` method and the ``autowire: true`` config in
216216
``services.yml``. When you type-hint an argument, the container will automatically
217-
find the matching service. If it can't or there is any ambuiguity, you'll see a clear
217+
find the matching service. If it can't or there is any ambiguity, you'll see a clear
218218
exception suggesting how to fix it.
219219

220220
Be sure to read more about :doc:`autowiring </service_container/autowiring>`.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy