]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add deprecated tag also to methods of deprecated classes - OC\\Hooks\\Emitter namespace 23767/head
authorMorris Jobke <hey@morrisjobke.de>
Wed, 28 Oct 2020 21:27:27 +0000 (22:27 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 28 Oct 2020 21:27:27 +0000 (22:27 +0100)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/Hooks/Emitter.php
lib/private/Hooks/EmitterTrait.php
lib/private/Hooks/PublicEmitter.php

index cd4793ef3f93a46f8b0cffc58343a26df7213afb..4240cef520ba4f5e41c977c237659b3b62ebd9a7 100644 (file)
@@ -39,6 +39,7 @@ interface Emitter {
         * @param string $method
         * @param callable $callback
         * @return void
+        * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
         */
        public function listen($scope, $method, callable $callback);
 
@@ -47,6 +48,7 @@ interface Emitter {
         * @param string $method optional
         * @param callable $callback optional
         * @return void
+        * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
         */
        public function removeListener($scope = null, $method = null, callable $callback = null);
 }
index 85efa218f644d1ed834e7ce04861119e34e1281b..1cbfe0f5a0629d576135303735f7470193dcbf1f 100644 (file)
@@ -24,6 +24,9 @@
 
 namespace OC\Hooks;
 
+/**
+ * @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
+ */
 trait EmitterTrait {
 
        /**
@@ -35,6 +38,7 @@ trait EmitterTrait {
         * @param string $scope
         * @param string $method
         * @param callable $callback
+        * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
         */
        public function listen($scope, $method, callable $callback) {
                $eventName = $scope . '::' . $method;
@@ -50,6 +54,7 @@ trait EmitterTrait {
         * @param string $scope optional
         * @param string $method optional
         * @param callable $callback optional
+        * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
         */
        public function removeListener($scope = null, $method = null, callable $callback = null) {
                $names = [];
@@ -93,6 +98,7 @@ trait EmitterTrait {
         * @param string $scope
         * @param string $method
         * @param array $arguments optional
+        * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
         */
        protected function emit($scope, $method, array $arguments = []) {
                $eventName = $scope . '::' . $method;
index dbccc34f2e96c9a4c4323906d3af851b565b8c78..e698b3221804cd4eaba18b9f5fdbd44797d7f048 100644 (file)
@@ -33,6 +33,7 @@ class PublicEmitter extends BasicEmitter {
         * @param string $scope
         * @param string $method
         * @param array $arguments optional
+        * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
         *
         * @suppress PhanAccessMethodProtected
         */