Skip to content

Commit 7e78509

Browse files
authored
Update service_container/factories.rst
1 parent c95e623 commit 7e78509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service_container/factories.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ create its object:
100100
the configured class name may be used by compiler passes and therefore
101101
should be set to a sensible value.
102102

103-
You can also use the ``factory`` option to create services from static methods
103+
When the static factory method is on the same class as the created instance, the class name can be omitted from the factory declaration.
104104
of the class itself.
105105
Let's suppose the ``NewsletterManager`` class has a ``create()`` method that needs
106106
to be called to create the object and need a send email address::

0 commit comments

Comments
 (0)