Let DI handle the magic

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
master^2
Roeland Jago Douma 6 年之前
父節點 543cfe5242
當前提交 ecfac31c21
沒有發現已知的金鑰在資料庫的簽署中
GPG Key ID: F941078878347C0C

@ -29,18 +29,5 @@ use OCP\AppFramework\IAppContainer;
class Application extends App {
public function __construct (array $urlParams = array()) {
parent::__construct('richdocuments', $urlParams);
$container = $this->getContainer();
$container->registerService(
DiscoveryManager::class,
function(IAppContainer $container) {
return new DiscoveryManager(
$container->getServer()->getHTTPClientService(),
$container->getServer()->getAppDataDir('richdocuments'),
$container->getServer()->getConfig(),
$container->getServer()->getL10N('richdocuments'),
new TimeFactory()
);
}
);
}
}
}

Loading…
取消
儲存