File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -261,4 +261,23 @@ class MyServiceProvider extends ServiceProvider
261261 {
262262 }
263263}
264+ ` ` `
265+
266+ # ## BitrixSettingsDiAdapter
267+
268+ Адаптер-импортер настроек битриксового сервис-локатора (`.settings.php`) в симфонический контейнер.
269+
270+ - **`importParameters(ContainerInterface $container, array $settings, ?string $section = null)`** - импорт параметров.
271+ ` section` - если задано, то параметры лягут в именованную секцию параметров контейнера.
272+ - **`importServices(ContainerInterface $container, array $services)`** - импорт сервисов. [Формат](https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=43&LESSON_ID=14032)
273+
274+ Считываются конфиги в Битриксе как-то так :
275+
276+ ` ` ` php
277+ use Bitrix\M ain\C onfig\C onfiguration;
278+
279+ $this->config = Configuration::getInstance()->get('my_config') ?? [];
280+ // Из модуля
281+ $this->parameters = Configuration::getInstance('my.module')->get('parameters') ?? [];
282+ $this->services = Configuration::getInstance('my.module')->get('services') ?? [];
264283` ` `
You can’t perform that action at this time.
0 commit comments