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

Appearance settings

Commit a196057

Browse filesBrowse files
committed
last tweaks from feedback
1 parent 2bce83d commit a196057
Copy full SHA for a196057

File tree

1 file changed

+5
-5
lines changed
Filter options

1 file changed

+5
-5
lines changed

‎service_container.rst

Copy file name to clipboardExpand all lines: service_container.rst
+5-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.