2014-08-30 15:04:33 +02:00
|
|
|
<?php
|
2014-09-17 14:32:26 +02:00
|
|
|
$dataDirectory = __DIR__
|
|
|
|
. DIRECTORY_SEPARATOR . '..'
|
|
|
|
. DIRECTORY_SEPARATOR . 'data';
|
|
|
|
|
|
|
|
$publicDataDirectory = __DIR__
|
|
|
|
. DIRECTORY_SEPARATOR . '..'
|
|
|
|
. DIRECTORY_SEPARATOR . 'public_html'
|
|
|
|
. DIRECTORY_SEPARATOR . 'data';
|
2014-09-09 12:34:57 +02:00
|
|
|
|
2014-08-30 15:04:33 +02:00
|
|
|
return [
|
2014-09-17 14:32:26 +02:00
|
|
|
\Szurubooru\Config::class => DI\object()->constructor($dataDirectory, $publicDataDirectory),
|
2014-08-31 13:34:31 +02:00
|
|
|
|
|
|
|
\Szurubooru\ControllerRepository::class => DI\object()->constructor(DI\link('controllers')),
|
2014-09-14 16:16:15 +02:00
|
|
|
\Szurubooru\Upgrades\UpgradeRepository::class => DI\object()->constructor(DI\link('upgrades')),
|
|
|
|
|
|
|
|
'upgrades' => DI\factory(function (DI\container $container) {
|
|
|
|
return [
|
|
|
|
$container->get(\Szurubooru\Upgrades\Upgrade01::class),
|
2014-09-14 16:44:57 +02:00
|
|
|
$container->get(\Szurubooru\Upgrades\Upgrade02::class),
|
2014-09-15 11:38:24 +02:00
|
|
|
$container->get(\Szurubooru\Upgrades\Upgrade03::class),
|
2014-09-18 19:30:12 +02:00
|
|
|
$container->get(\Szurubooru\Upgrades\Upgrade04::class),
|
2014-09-21 09:35:43 +02:00
|
|
|
$container->get(\Szurubooru\Upgrades\Upgrade05::class),
|
2014-09-21 09:58:04 +02:00
|
|
|
$container->get(\Szurubooru\Upgrades\Upgrade06::class),
|
2014-09-24 23:24:51 +02:00
|
|
|
$container->get(\Szurubooru\Upgrades\Upgrade07::class),
|
2014-09-14 16:16:15 +02:00
|
|
|
];
|
|
|
|
}),
|
2014-08-31 13:34:31 +02:00
|
|
|
|
2014-09-09 12:34:57 +02:00
|
|
|
'controllers' => DI\factory(function (DI\container $container) {
|
2014-08-31 13:34:31 +02:00
|
|
|
return [
|
2014-09-09 12:34:57 +02:00
|
|
|
$container->get(\Szurubooru\Controllers\AuthController::class),
|
|
|
|
$container->get(\Szurubooru\Controllers\UserController::class),
|
|
|
|
$container->get(\Szurubooru\Controllers\UserAvatarController::class),
|
2014-09-15 11:38:24 +02:00
|
|
|
$container->get(\Szurubooru\Controllers\PostController::class),
|
2014-09-17 12:59:33 +02:00
|
|
|
$container->get(\Szurubooru\Controllers\PostContentController::class),
|
2014-09-25 11:45:46 +02:00
|
|
|
$container->get(\Szurubooru\Controllers\GlobalParamController::class),
|
2014-08-31 13:34:31 +02:00
|
|
|
];
|
|
|
|
}),
|
2014-08-30 15:04:33 +02:00
|
|
|
];
|