share('database', 'Database'); $di->share('json', 'Json'); $di->share('oauth2', 'OAuth2') ->withArgument($di->get("database")); // PHPAuth is not used on site // Because PHPAuth is not MVC Pattern friendly we must do this nice disaster /*$phpAuthConfig = new PHPAuth\Config($di->get("database")->conn); $di->share('auth', 'PHPAuth\Auth') ->withArgument($di->get("database")->conn) ->withArgument($phpAuthConfig);*/ $di->share('latte', function () { $latte = new Latte\Engine; $latte->setTempDirectory(NULL); return $latte; }); // Initialize and run router $routerController = new RouterController(); $routerController->process($di);