Skip to content

Commit 46e7fc3

Browse files
committed
[Dependency Injection] Edits for readability and some grammar
1 parent c6675cc commit 46e7fc3

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Glossary
3131
connection object or an object that delivers email messages. In Symfony2,
3232
services are often configured and retrieved from the service container.
3333
An application that has many decoupled services is said to follow
34-
a `service-oriented architecture`_
34+
a `service-oriented architecture`_.
3535

3636
Service Container
3737
A *Service Container*, also known as a *Dependency Injection Container*,

guides/dependency_injection/overview.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ The purpose of parameters is to feed information into services. Of course
231231
there was nothing wrong with defining the service without using any parameters.
232232
Parameters, however, have several advantages:
233233

234-
* separation and organization of all of the service "options" under a single
234+
* separation and organization of all service "options" under a single
235235
``parameters`` key;
236236

237237
* parameter values can be used in multiple service definitions;
@@ -262,8 +262,8 @@ be imported from inside this file in one way or another. This gives you absolute
262262
flexibility over the services in your application.
263263

264264
External service configuration can be imported in two different ways. First,
265-
we'll talk about the method that you'll use most commonly in your application
266-
- the ``imports`` directive. In the following section, we'll introduce the
265+
we'll talk about the method that you'll use most commonly in your application:
266+
the ``imports`` directive. In the following section, we'll introduce the
267267
second method, which is the flexible and preferred method for importing service
268268
configuration from third-party bundles.
269269

@@ -353,7 +353,7 @@ configuration.
353353
The ``imports`` directive allows your application to include service container
354354
configuration resources from any other location (most commonly from bundles).
355355
The ``resource`` location, for files, is the absolute path to the resource
356-
file. The special ``@HelloBundle`` syntax resolves to the directory path to
356+
file. The special ``@HelloBundle`` syntax resolves the directory path of
357357
the ``HelloBundle``. This helps you specify the path to the resource without
358358
worrying later if you move the ``HelloBundle`` to a different directory.
359359

@@ -367,21 +367,21 @@ Importing Configuration via Container Extensions
367367

368368
When developing in Symfony2, you'll most commonly use the ``imports`` directive
369369
to import container configuration from the bundles you've created specifically
370-
for your application. Third-party bundle container configuration (including
371-
the Symfony2 core services), are usually loaded using another method that's
372-
more flexible and easy to configure in your application.
370+
for your application. Third-party bundle container configuration, including
371+
Symfony2 core services, are usually loaded using another method that's more
372+
flexible and easy to configure in your application.
373373

374374
Here's how it works. Internally, each bundle defines its services very much
375-
like we've seen so far in this guide. Namely, a bundle uses one or more
376-
configuration resource files (usually XML) to specify the parameters and
377-
services for that bundle. However, instead of importing each of these resources
378-
directly from your application configuration using the ``imports`` directive,
379-
you can simply invoke a *service container extension* inside the bundle that
380-
does the work for you. A service container extension is a PHP class created
381-
by the bundle author to accomplish two things:
375+
like we've seen so far. Namely, a bundle uses one or more configuration
376+
resource files (usually XML) to specify the parameters and services for that
377+
bundle. However, instead of importing each of these resources directly from
378+
your application configuration using the ``imports`` directive, you can simply
379+
invoke a *service container extension* inside the bundle that does the work for
380+
you. A service container extension is a PHP class created by the bundle author
381+
to accomplish two things:
382382

383-
* import all of the service container resources needed to configure the
384-
services for the bundle;
383+
* import all service container resources needed to configure the services for
384+
the bundle;
385385

386386
* provide semantic, straightforward configuration so that the bundle can
387387
be configured without interacting with the flat parameters of the bundle's
@@ -450,7 +450,7 @@ the services specific to it. The bundle takes care of creating all the necessary
450450
``parameters`` and ``services`` for the service container, while still allowing
451451
much of the configuration to be easily customized. As an added bonus, most
452452
service container extensions are also smart enough to perform validation -
453-
notifying you of missing options or options with the wrong data type.
453+
notifying you of options that are missing or the wrong data type.
454454

455455
When installing or configuring a bundle, see the bundle's documentation for
456456
how the services for the bundle should be installed and configured. The options
@@ -649,7 +649,7 @@ the framework.
649649

650650
Be sure that ``swiftmailer`` entry appears in your application
651651
configuration. As we mentioned in :ref:`service-container-extension-configuration`,
652-
the ``swiftmailer`` invokes the service extension from the
652+
the ``swiftmailer`` key invokes the service extension from the
653653
``SwiftmailerBundle``, which registers the ``mailer`` service.
654654

655655
.. index::
@@ -704,9 +704,9 @@ with ``twig.extension`` and automatically registers them as extensions.
704704
Tags, then, are a way to tell Symfony2 or other third-party bundles that
705705
your service should be registered or used in some special way by the bundle.
706706

707-
The following is a list of the tags available with the core Symfony2 bundles.
708-
Each of these has a different affect on your service and many tags require
709-
additional arguments (beyond just the ``name`` attribute).
707+
The following is a list of tags available with the core Symfony2 bundles.
708+
Each of these has a different effect on your service and many tags require
709+
additional arguments (beyond just the ``name`` parameter).
710710

711711
* assetic.filter
712712
* assetic.templating.php

0 commit comments

Comments
 (0)