22 lines
462 B
PHP
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);
|