diff --git a/book/service_container.rst b/book/service_container.rst index 24526c7319b..f2ea4238053 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -670,7 +670,7 @@ Using references is a very powerful tool that allows you to create independent s classes with well-defined dependencies. In this example, the ``newsletter_manager`` service needs the ``my_mailer`` service in order to function. When you define this dependency in the service container, the container takes care of all -the work of instantiating the objects. +the work of instantiating the classes. Optional Dependencies: Setter Injection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/dependency_injection/factories.rst b/components/dependency_injection/factories.rst index 4f939b04527..70fcbd0142f 100644 --- a/components/dependency_injection/factories.rst +++ b/components/dependency_injection/factories.rst @@ -10,7 +10,7 @@ as well as calling methods and setting parameters. Sometimes, however, this will not provide you with everything you need to construct your objects. For this situation, you can use a factory to create the object and tell the service container to call a method on the factory rather than directly instantiating -the object. +the class. Suppose you have a factory that configures and returns a new NewsletterManager object:: diff --git a/cookbook/form/use_empty_data.rst b/cookbook/form/use_empty_data.rst index 2824d7a0e9b..5b28d7bb1cd 100644 --- a/cookbook/form/use_empty_data.rst +++ b/cookbook/form/use_empty_data.rst @@ -61,7 +61,7 @@ that constructor with no arguments:: You can instantiate your class however you want. In this example, we pass some dependency into the ``BlogType`` when we instantiate it, then use that -to instantiate the ``Blog`` object. The point is, you can set ``empty_data`` +to instantiate the ``Blog`` class. The point is, you can set ``empty_data`` to the exact "new" object that you want to use. Option 2: Provide a Closure