Projekt

Obecné

Profil

Stáhnout (1.21 KB) Statistiky
| Větev: | Tag: | Revize:
1
<?php
2

    
3
require __DIR__ . '/../vendor/autoload.php';
4

    
5
$configurator = new Nette\Configurator;
6

    
7
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

    
17
// CIV prostředí, hovna, sračky, jsou to prostě nejlepčí kucí
18
else
19
{
20
    $logDir = '/tmp/klinopis/log';
21
    $tempDir = '/tmp/klinopis/temp';
22

    
23
    if (!file_exists($logDir))
24
    {
25
        mkdir($logDir, 0700, TRUE);
26
    }
27

    
28
    if (!file_exists($tempDir))
29
    {
30
        mkdir($tempDir, 0700, TRUE);
31
    }
32

    
33
    $configurator->enableTracy($logDir);
34
    $configurator->setTempDirectory($tempDir);
35
}
36

    
37
$configurator->setTimeZone('Europe/Prague');
38

    
39
$configurator->createRobotLoader()
40
	->addDirectory(__DIR__)
41
	->register();
42

    
43
$configurator->addConfig(__DIR__ . '/config/config.neon');
44
$configurator->addConfig(__DIR__ . '/config/config.local.neon');
45
$configurator->addConfig(__DIR__ . '/config/model.neon');
46
$configurator->addConfig(__DIR__ . '/config/components.neon');
47

    
48
$container = $configurator->createContainer();
49

    
50
return $container;
(2-2/2)