I'm using more than one database. So I have this kind of configuration in my global.php file:
return [
'db' => [
...
],
'adapters' => [
'adapter1' => [
...
]
],
'adapter2' => [
...
]
]
]
]
];
And my goal is to get the configuration of all my adapters in one instruction. I don't know if it is possible. There is this instruction to get one adapter :
$sm->get('adapter1');
But I want to have something like that:
$sm->get('adapters');
I didn't find any solution right now so I decided to ask the question here... I suppose this is something possible because the file just containing a simple array...
Yours
EDIT :
I tried
$sm->get('config')['db']['adapters'];
But it returns an array of string. Actually, I would like an array of Objects. Objects of Adapter. The same way I get an adapter in this way :
$sm->get('adapter1');
Yours