summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorTobia De Koninck <tobia@ledfan.be>2017-09-16 13:42:46 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-12-11 18:18:58 +0100
commitf6ef779f97c2abf0543184e58dd27b39aa0ea3bc (patch)
treed730368e486868726fc6a7df068c8c34a11d75c3 /lib/private
parent45971879f525f146c225e1e7f6078ae241f32495 (diff)
downloadnextcloud-server-f6ef779f97c2abf0543184e58dd27b39aa0ea3bc.tar.gz
nextcloud-server-f6ef779f97c2abf0543184e58dd27b39aa0ea3bc.zip
Make ContactsStore a public API
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php3
-rw-r--r--lib/private/Server.php10
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index 108ff0d4989..43600470e1f 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -35,8 +35,9 @@ use OCP\IGroupManager;
use OCP\IUser;
use OCP\IUserManager;
use OCP\IUserSession;
+use OCP\Contacts\ContactsMenu\IContactsStore;
-class ContactsStore {
+class ContactsStore implements IContactsStore {
/** @var IManager */
private $contactsManager;
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 0dfbcbb75ec..09128f33bfb 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -63,6 +63,7 @@ use OC\Collaboration\Collaborators\RemotePlugin;
use OC\Collaboration\Collaborators\UserPlugin;
use OC\Command\CronBus;
use OC\Contacts\ContactsMenu\ActionFactory;
+use OC\Contacts\ContactsMenu\ContactsStore;
use OC\Diagnostics\EventLogger;
use OC\Diagnostics\QueryLogger;
use OC\Federation\CloudIdManager;
@@ -1129,6 +1130,15 @@ class Server extends ServerContainer implements IServerContainer {
return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->getHTTPClientService());
});
+ $this->registerService(\OCP\Contacts\ContactsMenu\IContactsStore::class, function(Server $c) {
+ return new ContactsStore(
+ $c->getContactsManager(),
+ $c->getConfig(),
+ $c->getUserManager(),
+ $c->getGroupManager()
+ );
+ });
+
$this->connectDispatcher();
}