Moved backend DI definitions
This commit is contained in:
parent
e13db65f68
commit
5573c49985
3 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
[database]
|
[database]
|
||||||
host = localhost
|
host = localhost
|
||||||
port = 27017;
|
port = 27017
|
||||||
name = booru-dev
|
name = booru-dev
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
|
|
|
@ -7,7 +7,7 @@ require_once(__DIR__ . DS . '..' . DS . 'src' . DS . 'AutoLoader.php');
|
||||||
|
|
||||||
$builder = new \DI\ContainerBuilder();
|
$builder = new \DI\ContainerBuilder();
|
||||||
$builder->setDefinitionCache(new Doctrine\Common\Cache\ArrayCache());
|
$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();
|
$container = $builder->build();
|
||||||
$dispatcher = $container->get('Szurubooru\Dispatcher');
|
$dispatcher = $container->get('Szurubooru\Dispatcher');
|
||||||
$dispatcher->run();
|
$dispatcher->run();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
\Szurubooru\Config::class => DI\object()->constructor([
|
\Szurubooru\Config::class => DI\object()->constructor([
|
||||||
__DIR__ . DS . 'config.ini',
|
__DIR__ . DS . '..' . DS . 'config.ini',
|
||||||
__DIR__ . DS . 'local.ini']),
|
__DIR__ . DS . '..' . DS . 'local.ini']),
|
||||||
|
|
||||||
\Szurubooru\ControllerRepository::class => DI\object()->constructor(DI\link('controllers')),
|
\Szurubooru\ControllerRepository::class => DI\object()->constructor(DI\link('controllers')),
|
||||||
|
|
Loading…
Reference in a new issue