diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-08-14 15:40:15 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-08-14 15:40:15 +0200 |
commit | 0b64268910a0fc681f1b2b6a154e08af2818b379 (patch) | |
tree | 7d3f43e160be376cf42f48c637d416372e82be58 /lib/private/server.php | |
parent | ddc7f668e59223d95cb42e4f0281d5dab5888d79 (diff) | |
download | nextcloud-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.php | 17 |
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'); + } } |