This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
bee-backend-ARCHIVED/config/container.php
2024-08-24 20:33:05 +00:00

22 lines
462 B
PHP

<?php
declare(strict_types=1);
use Laminas\ServiceManager\ServiceManager;
use Symfony\Component\Dotenv\Dotenv;
$dotenv = new Dotenv();
if (file_exists(__DIR__ . '/../.env')) {
$dotenv->load(__DIR__ . '/../.env');
}
// Load configuration
$config = require __DIR__ . '/config.php';
$dependencies = $config['dependencies'];
$dependencies['services']['config'] = $config;
// Build container
return new ServiceManager($dependencies);