aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index 6692e6f6bbf..ecac18d6a9b 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -528,6 +528,13 @@ class Server extends SimpleContainer implements IServerContainer {
});
return $manager;
});
+ $this->registerService('CommentsManager', function(Server $c) {
+ $config = $c->getConfig();
+ $factoryClass = $config->getSystemValue('comments.managerFactory', '\OC\Comments\ManagerFactory');
+ /** @var \OCP\Comments\ICommentsManagerFactory $factory */
+ $factory = new $factoryClass();
+ return $factory->getManager();
+ });
$this->registerService('EventDispatcher', function() {
return new EventDispatcher();
});
@@ -1121,6 +1128,10 @@ class Server extends SimpleContainer implements IServerContainer {
return $this->query('NotificationManager');
}
+ public function getCommentsManager() {
+ return $this->query('CommentsManager');
+ }
+
/**
* @return \OC\IntegrityCheck\Checker
*/