Init
This commit is contained in:
33
app/Bootstrap.php
Executable file
33
app/Bootstrap.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App;
|
||||
|
||||
use Nette\Bootstrap\Configurator;
|
||||
|
||||
|
||||
class Bootstrap
|
||||
{
|
||||
public static function boot(): Configurator
|
||||
{
|
||||
$configurator = new Configurator;
|
||||
$appDir = dirname(__DIR__);
|
||||
|
||||
$configurator->setDebugMode($_SERVER['HTTP_HOST'] === 'localhost');
|
||||
$configurator->enableTracy($appDir . '/log');
|
||||
|
||||
$configurator->setTimeZone('Europe/Prague');
|
||||
$configurator->setTempDirectory($appDir . '/temp');
|
||||
|
||||
$configurator->createRobotLoader()
|
||||
->addDirectory(__DIR__)
|
||||
->register();
|
||||
|
||||
$configurator->addConfig($appDir . '/config/common.neon');
|
||||
$configurator->addConfig($appDir . '/config/services.neon');
|
||||
$configurator->addConfig($appDir . '/config/local.neon');
|
||||
|
||||
return $configurator;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user