File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,17 @@ $kernel = container()->get('kernel');
245245делегированными контейнерами.
246246
247247` ` ` php
248- $kernel = delegatedContainer()->get('my_module_id.service');
248+ $moduleService = delegatedContainer()->get('my_module_id.service');
249+ ` ` `
250+
251+ В контейнере делегированный контейнер помечается тэгом `delegated.container` (их может быть сколь угодно много) :
252+
253+ ` ` ` yaml
254+ module_notifier_container:
255+ class: Symfony\C omponent\D ependencyInjection\C ontainerInterface
256+ factory: ['Proklung\N otifier\D I\S ervices', 'getInstance']
257+ tags:
258+ - { name: 'delegated.container' }
249259` ` `
250260
251261Делегированный контейнер - автономный контейнер, сформированные в модуле, плагине и тому подобных местах.
You can’t perform that action at this time.
0 commit comments