Skip to content

Commit a437074

Browse files
committed
Merge pull request #3073 from samsonasik/fix/wording
fix wording : instantiate "class", not instantiate "object"
2 parents 1edd26b + 1fc8918 commit a437074

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

book/service_container.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ Using references is a very powerful tool that allows you to create independent s
670670
classes with well-defined dependencies. In this example, the ``newsletter_manager``
671671
service needs the ``my_mailer`` service in order to function. When you define
672672
this dependency in the service container, the container takes care of all
673-
the work of instantiating the objects.
673+
the work of instantiating the classes.
674674

675675
Optional Dependencies: Setter Injection
676676
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

components/dependency_injection/factories.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ as well as calling methods and setting parameters. Sometimes, however, this
1010
will not provide you with everything you need to construct your objects.
1111
For this situation, you can use a factory to create the object and tell the
1212
service container to call a method on the factory rather than directly instantiating
13-
the object.
13+
the class.
1414

1515
Suppose you have a factory that configures and returns a new NewsletterManager
1616
object::

cookbook/form/use_empty_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ that constructor with no arguments::
6161

6262
You can instantiate your class however you want. In this example, we pass
6363
some dependency into the ``BlogType`` when we instantiate it, then use that
64-
to instantiate the ``Blog`` object. The point is, you can set ``empty_data``
64+
to instantiate the ``Blog`` class. The point is, you can set ``empty_data``
6565
to the exact "new" object that you want to use.
6666

6767
Option 2: Provide a Closure

0 commit comments

Comments
 (0)