Added Injector class

This commit is contained in:
Marcin Kurczewski
2014-09-05 20:33:05 +02:00
parent 8edf81e75e
commit c70554330c
2 changed files with 23 additions and 5 deletions

View File

@ -5,9 +5,5 @@ define('DS', DIRECTORY_SEPARATOR);
require_once(__DIR__ . DS . '..' . DS . 'vendor' . DS . 'autoload.php');
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 . 'src' . DS . 'di.php');
$container = $builder->build();
$dispatcher = $container->get('Szurubooru\Dispatcher');
$dispatcher = \Szurubooru\Injector::get(\Szurubooru\Dispatcher::class);
$dispatcher->run();