Moved backend DI definitions

This commit is contained in:
Marcin Kurczewski 2014-09-02 09:38:12 +02:00
parent e13db65f68
commit 5573c49985
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[database]
host = localhost
port = 27017;
port = 27017
name = booru-dev
[security]

View file

@ -7,7 +7,7 @@ require_once(__DIR__ . DS . '..' . DS . 'src' . DS . 'AutoLoader.php');
$builder = new \DI\ContainerBuilder();
$builder->setDefinitionCache(new Doctrine\Common\Cache\ArrayCache());
$builder->addDefinitions(__DIR__ . DS . '..' . DS . 'di.php');
$builder->addDefinitions(__DIR__ . DS . '..' . DS . 'src' . DS . 'di.php');
$container = $builder->build();
$dispatcher = $container->get('Szurubooru\Dispatcher');
$dispatcher->run();

View file

@ -1,8 +1,8 @@
<?php
return [
\Szurubooru\Config::class => DI\object()->constructor([
__DIR__ . DS . 'config.ini',
__DIR__ . DS . 'local.ini']),
__DIR__ . DS . '..' . DS . 'config.ini',
__DIR__ . DS . '..' . DS . 'local.ini']),
\Szurubooru\ControllerRepository::class => DI\object()->constructor(DI\link('controllers')),