Add deprecated tag also to methods of deprecated classes - OC\\Hooks\\Emitter namespace
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
ef382f541c
commit
704fb2dbf2
|
@ -39,6 +39,7 @@ interface Emitter {
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
* @return void
|
* @return void
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
|
||||||
*/
|
*/
|
||||||
public function listen($scope, $method, callable $callback);
|
public function listen($scope, $method, callable $callback);
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ interface Emitter {
|
||||||
* @param string $method optional
|
* @param string $method optional
|
||||||
* @param callable $callback optional
|
* @param callable $callback optional
|
||||||
* @return void
|
* @return void
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
|
||||||
*/
|
*/
|
||||||
public function removeListener($scope = null, $method = null, callable $callback = null);
|
public function removeListener($scope = null, $method = null, callable $callback = null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
|
|
||||||
namespace OC\Hooks;
|
namespace OC\Hooks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
|
||||||
|
*/
|
||||||
trait EmitterTrait {
|
trait EmitterTrait {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +38,7 @@ trait EmitterTrait {
|
||||||
* @param string $scope
|
* @param string $scope
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
|
||||||
*/
|
*/
|
||||||
public function listen($scope, $method, callable $callback) {
|
public function listen($scope, $method, callable $callback) {
|
||||||
$eventName = $scope . '::' . $method;
|
$eventName = $scope . '::' . $method;
|
||||||
|
@ -50,6 +54,7 @@ trait EmitterTrait {
|
||||||
* @param string $scope optional
|
* @param string $scope optional
|
||||||
* @param string $method optional
|
* @param string $method optional
|
||||||
* @param callable $callback optional
|
* @param callable $callback optional
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
|
||||||
*/
|
*/
|
||||||
public function removeListener($scope = null, $method = null, callable $callback = null) {
|
public function removeListener($scope = null, $method = null, callable $callback = null) {
|
||||||
$names = [];
|
$names = [];
|
||||||
|
@ -93,6 +98,7 @@ trait EmitterTrait {
|
||||||
* @param string $scope
|
* @param string $scope
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @param array $arguments optional
|
* @param array $arguments optional
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
|
||||||
*/
|
*/
|
||||||
protected function emit($scope, $method, array $arguments = []) {
|
protected function emit($scope, $method, array $arguments = []) {
|
||||||
$eventName = $scope . '::' . $method;
|
$eventName = $scope . '::' . $method;
|
||||||
|
|
|
@ -33,6 +33,7 @@ class PublicEmitter extends BasicEmitter {
|
||||||
* @param string $scope
|
* @param string $scope
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @param array $arguments optional
|
* @param array $arguments optional
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
|
||||||
*
|
*
|
||||||
* @suppress PhanAccessMethodProtected
|
* @suppress PhanAccessMethodProtected
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue