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 c14f4da

Browse filesBrowse files
committed
Remove merge conflict
1 parent 4bbe6c6 commit c14f4da
Copy full SHA for c14f4da

File tree

1 file changed

+0
-19
lines changed
Filter options

1 file changed

+0
-19
lines changed

‎components/dependency_injection/factories.rst

Copy file name to clipboardExpand all lines: components/dependency_injection/factories.rst
-19Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@ object::
3333
}
3434

3535
To make the ``NewsletterManager`` object available as a service, you can
36-
<<<<<<< HEAD
3736
configure the service container to use the
3837
``NewsletterFactory::createNewsletterManager()`` factory method:
39-
=======
40-
configure the service container to use the ``NewsletterManagerFactory``
41-
factory class:
42-
>>>>>>> 2.3
4338

4439
.. configuration-block::
4540

@@ -82,18 +77,10 @@ factory class:
8277
the configured class name may be used by compiler passes and therefore
8378
should be set to a sensible value.
8479

85-
<<<<<<< HEAD
8680
Now, the method will be called statically. If the factory class itself should
8781
be instantiated and the resulting object's method called, configure the factory
8882
itself as a service. In this case, the method (e.g. get) should be changed to
8983
be non-static.
90-
=======
91-
When you specify the class to use for the factory (via ``factory_class``)
92-
the method will be called statically. If the factory itself should be instantiated
93-
and the resulting object's method called, configure the factory itself
94-
as a service. In this case, the method (e.g. ``createNewsletterManager``)
95-
should be changed to be non-static:
96-
>>>>>>> 2.3
9784

9885
.. configuration-block::
9986

@@ -130,18 +117,12 @@ should be changed to be non-static:
130117
// ...
131118
$container->register('newsletter_manager.factory', 'NewsletterManagerFactory');
132119
133-
<<<<<<< HEAD
134120
$newsletterManager = new Definition();
135121
$newsletterManager->setFactory(array(
136122
new Reference('newsletter_manager.factory'),
137123
'createNewsletterManager'
138124
));
139125
$container->setDefinition('newsletter_manager', $newsletterManager);
140-
=======
141-
The factory service is specified by its id name and not a reference
142-
to the service itself. So, you do not need to use the ``@`` syntax for
143-
this in YAML configurations.
144-
>>>>>>> 2.3
145126
146127
Passing Arguments to the Factory Method
147128
---------------------------------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.