1 |
67c41231
|
Filip Jani
|
<?php
|
2 |
|
|
|
3 |
|
|
require __DIR__ . '/../vendor/autoload.php';
|
4 |
|
|
|
5 |
|
|
$configurator = new Nette\Configurator;
|
6 |
|
|
|
7 |
6209fbe5
|
Filip Jani
|
include __DIR__ . '/bootstrap-local.php';
|
8 |
|
|
|
9 |
|
|
// dev prostředí, kytičky, sluníčko, všechno hezky funguje
|
10 |
|
|
if ($env === 'dev')
|
11 |
|
|
{
|
12 |
|
|
$configurator->setDebugMode(TRUE); // enable for your remote IP
|
13 |
|
|
$configurator->enableTracy(__DIR__ . '/../log');
|
14 |
|
|
$configurator->setTempDirectory(__DIR__ . '/../temp');
|
15 |
|
|
}
|
16 |
42e372b4
|
Filip Jani
|
// CIV prostředí
|
17 |
6209fbe5
|
Filip Jani
|
else
|
18 |
|
|
{
|
19 |
|
|
if (!file_exists($logDir))
|
20 |
|
|
{
|
21 |
|
|
mkdir($logDir, 0700, TRUE);
|
22 |
|
|
}
|
23 |
|
|
|
24 |
|
|
if (!file_exists($tempDir))
|
25 |
|
|
{
|
26 |
|
|
mkdir($tempDir, 0700, TRUE);
|
27 |
|
|
}
|
28 |
|
|
|
29 |
|
|
$configurator->enableTracy($logDir);
|
30 |
|
|
$configurator->setTempDirectory($tempDir);
|
31 |
|
|
}
|
32 |
67c41231
|
Filip Jani
|
|
33 |
|
|
$configurator->setTimeZone('Europe/Prague');
|
34 |
|
|
|
35 |
|
|
$configurator->createRobotLoader()
|
36 |
|
|
->addDirectory(__DIR__)
|
37 |
|
|
->register();
|
38 |
|
|
|
39 |
|
|
$configurator->addConfig(__DIR__ . '/config/config.neon');
|
40 |
|
|
$configurator->addConfig(__DIR__ . '/config/config.local.neon');
|
41 |
ee62b2c5
|
Filip Jani
|
$configurator->addConfig(__DIR__ . '/config/model.neon');
|
42 |
dd522430
|
Filip Jani
|
$configurator->addConfig(__DIR__ . '/config/components.neon');
|
43 |
67c41231
|
Filip Jani
|
|
44 |
|
|
$container = $configurator->createContainer();
|
45 |
|
|
|
46 |
|
|
return $container;
|