Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl>
Reviewed-on: #45
This commit is contained in:
2025-10-04 11:40:52 -03:00
parent 6ddc48ec60
commit 742de657c5
815 changed files with 62089 additions and 3287 deletions

33
app/setup/container.php Normal file
View File

@ -0,0 +1,33 @@
<?php
use Psr\Container\ContainerInterface;
use DI\ContainerBuilder;
/**
* @return ContainerInterface
* @throws Exception
*/
function buildContainer(): ContainerInterface
{
$builder = new ContainerBuilder();
$folders = [
'settings',
'setups'
];
foreach ($folders as $folder_name) {
$folder = implode(DIRECTORY_SEPARATOR, [
__DIR__,
$folder_name
]);
if (!file_exists($folder)) {
continue;
}
$files = new FilesystemIterator($folder);
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
$builder->addDefinitions($file->getRealPath());
}
}
return $builder->build();
}