Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit4ef1a71

Browse files
yanickjweaverryan
yanickj
authored andcommitted
Synchronized setter injection occurs on Container::set() not on Container::enterScope()
1 parent7c1b2c3 commit4ef1a71

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎cookbook/service_container/scopes.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ marked as ``synchronized``:
134134
class:Acme\HelloBundle\Client\ClientConfiguration
135135
scope:client
136136
synchronized:true
137+
synthetic:true
137138
# ...
138139
139140
..code-block::xml
@@ -151,6 +152,7 @@ marked as ``synchronized``:
151152
id="client_configuration"
152153
scope="client"
153154
synchronized="true"
155+
synthetic="true"
154156
class="Acme\HelloBundle\Client\ClientConfiguration"
155157
/>
156158
</services>
@@ -196,9 +198,9 @@ and everything works without any special code in your service or in your definit
196198
}
197199
}
198200

199-
Whenever the ``client`` scope isentered or left, the service container will
200-
automatically call the ``setClientConfiguration()`` methodwith the current
201-
``client_configuration``instance.
201+
Whenever the ``client`` scope isactive, the service container will
202+
automatically call the ``setClientConfiguration()`` methodwhen the
203+
``client_configuration``service is set in the container.
202204

203205
You might have noticed that the ``setClientConfiguration()`` method accepts
204206
``null`` as a valid value for the ``client_configuration`` argument. That's

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp