summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-14 15:40:15 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-14 15:40:15 +0200
commit0b64268910a0fc681f1b2b6a154e08af2818b379 (patch)
tree7d3f43e160be376cf42f48c637d416372e82be58 /lib/private/server.php
parentddc7f668e59223d95cb42e4f0281d5dab5888d79 (diff)
downloadnextcloud-server-0b64268910a0fc681f1b2b6a154e08af2818b379.tar.gz
nextcloud-server-0b64268910a0fc681f1b2b6a154e08af2818b379.zip
Adding EventDispatcher to IServerContainer
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index 618431ff2d4..89001567219 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -51,7 +51,6 @@ use OC\Http\Client\ClientService;
use OC\Lock\MemcacheLockingProvider;
use OC\Lock\NoopLockingProvider;
use OC\Mail\Mailer;
-use OC\Memcache\NullCache;
use OC\Security\CertificateManager;
use OC\Security\Crypto;
use OC\Security\Hasher;
@@ -59,6 +58,8 @@ use OC\Security\SecureRandom;
use OC\Security\TrustedDomainHelper;
use OC\Tagging\TagMapper;
use OCP\IServerContainer;
+use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class Server
@@ -457,7 +458,9 @@ class Server extends SimpleContainer implements IServerContainer {
});
return $manager;
});
-
+ $this->registerService('EventDispatcher', function() {
+ return new EventDispatcher();
+ });
}
/**
@@ -963,4 +966,14 @@ class Server extends SimpleContainer implements IServerContainer {
public function getCapabilitiesManager() {
return $this->query('CapabilitiesManager');
}
+
+ /**
+ * Get the EventDispatcher
+ *
+ * @return EventDispatcherInterface
+ * @since 8.2.0
+ */
+ public function getEventDispatcher() {
+ return $this->query('EventDispatcher');
+ }
}