diff options
author | Joas Schilling <coding@schilljs.com> | 2023-07-28 14:10:27 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-07-28 14:11:22 +0200 |
commit | 3962cd0aa8ab7530deffa3b41cab2e11a01fd14a (patch) | |
tree | f8ec289aacdf05398e2407b8e7e54b547ee1986e /lib/private/Files/Node/Node.php | |
parent | b9e2f494a1307dac05b49fe74a224dc93f4c70e7 (diff) | |
download | nextcloud-server-3962cd0aa8ab7530deffa3b41cab2e11a01fd14a.tar.gz nextcloud-server-3962cd0aa8ab7530deffa3b41cab2e11a01fd14a.zip |
fix!: Move getEventDispatcher usage to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Files/Node/Node.php')
-rw-r--r-- | lib/private/Files/Node/Node.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php index 4ba2c472c67..61ae762638f 100644 --- a/lib/private/Files/Node/Node.php +++ b/lib/private/Files/Node/Node.php @@ -32,6 +32,8 @@ namespace OC\Files\Node; use OC\Files\Filesystem; use OC\Files\Mount\MoveableMount; use OC\Files\Utils\PathHelper; +use OCP\EventDispatcher\GenericEvent; +use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\FileInfo; use OCP\Files\InvalidPathException; use OCP\Files\IRootFolder; @@ -40,7 +42,6 @@ use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\Lock\LockedException; use OCP\PreConditionNotMetException; -use Symfony\Component\EventDispatcher\GenericEvent; // FIXME: this class really should be abstract class Node implements INode { @@ -127,7 +128,8 @@ class Node implements INode { */ protected function sendHooks($hooks, array $args = null) { $args = !empty($args) ? $args : [$this]; - $dispatcher = \OC::$server->getEventDispatcher(); + /** @var IEventDispatcher $dispatcher */ + $dispatcher = \OC::$server->get(IEventDispatcher::class); foreach ($hooks as $hook) { if (method_exists($this->root, 'emit')) { $this->root->emit('\OC\Files', $hook, $args); |