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

Commitb1f0343

Browse files
committed
Incorporate feedback
1 parent1754ff8 commitb1f0343

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎service_container/lazy_services.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Lazy Services
66

77
..seealso::
88

9-
Another way to inject services lazily is via a:doc:`service subscriber</service_container/service_subscribers>`.
9+
Another way to inject services lazily is via a:doc:`service subscriber</service_container/service_subscribers_locators>`.
1010

1111
Why Lazy Services?
1212
------------------

‎service_container/service_subscribers.rst‎renamed to ‎service_container/service_subscribers_locators.rst‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
..index::
22
single: DependencyInjection; Service Subscribers
33

4-
Service Subscribers
5-
===================
4+
Service Subscribers & Locators
5+
==============================
66

77
Sometimes, a service needs access to several other services without being sure
88
that all of them will actually be used. In those cases, you may want the
@@ -85,7 +85,7 @@ Defining a Service Subscriber
8585
-----------------------------
8686

8787
First, turn ``CommandBus`` into an implementation of:class:`Symfony\\Component\\DependencyInjection\\ServiceSubscriberInterface`.
88-
Use its ``getSubscribedServices`` method to include as many services as needed
88+
Use its ``getSubscribedServices()`` method to include as many services as needed
8989
in the service subscriber and change the type hint of the container to
9090
a PSR-11 ``ContainerInterface``::
9191

@@ -141,7 +141,7 @@ which implements the PSR-11 ``ContainerInterface``, but it is also a callable::
141141

142142
return $handler->handle($command);
143143

144-
Includingservices
144+
IncludingServices
145145
------------------
146146

147147
In order to add a new dependency to the service subscriber, use the
@@ -158,7 +158,7 @@ service locator::
158158
];
159159
}
160160

161-
Service types can also be keyed by a service name foruse internally::
161+
Service types can also be keyed by a service name forinternal use::
162162

163163
use Psr\Log\LoggerInterface;
164164

@@ -170,7 +170,7 @@ Service types can also be keyed by a service name for use internally::
170170
];
171171
}
172172

173-
Optionalservices
173+
OptionalServices
174174
~~~~~~~~~~~~~~~~~
175175

176176
For optional dependencies, prepend the service type with a ``?`` to prevent
@@ -191,7 +191,7 @@ errors if there's no matching service found in the service container::
191191
Make sure an optional service exists by calling ``has()`` on the service
192192
locator before calling the service itself.
193193

194-
Aliasedservices
194+
AliasedServices
195195
~~~~~~~~~~~~~~~~
196196

197197
By default, autowiring is used to match a service type to a service from the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp