mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 09:35:28 +00:00
add multi-environment configuration support
This commit is contained in:
parent
74e7035123
commit
073619b461
16 changed files with 62 additions and 54 deletions
21
src/config/bootstrap.php
Normal file
21
src/config/bootstrap.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
// PHP
|
||||
declare(strict_types=1);
|
||||
|
||||
// Environment
|
||||
if (!empty($_SERVER['PHP_ENV']) && file_exists(sprintf('%s/env.%s.php', __DIR__, $_SERVER['PHP_ENV'])))
|
||||
{
|
||||
require_once sprintf('%s/env.%s.php', __DIR__, $_SERVER['PHP_ENV']);
|
||||
}
|
||||
|
||||
else require_once __DIR__ . '/env.default.php';
|
||||
|
||||
// Autoload
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
// Local
|
||||
require_once __DIR__ . '/../library/database.php';
|
||||
require_once __DIR__ . '/../library/sphinx.php';
|
||||
require_once __DIR__ . '/../library/scrapeer.php';
|
||||
require_once __DIR__ . '/../library/time.php';
|
||||
Loading…
Add table
Add a link
Reference in a new issue