1
0

Emitter.php 979 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\Hooks;
  8. /**
  9. * Class Emitter
  10. *
  11. * interface for all classes that are able to emit events
  12. *
  13. * @package OC\Hooks
  14. * @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
  15. */
  16. interface Emitter {
  17. /**
  18. * @param string $scope
  19. * @param string $method
  20. * @param callable $callback
  21. * @return void
  22. * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
  23. */
  24. public function listen($scope, $method, callable $callback);
  25. /**
  26. * @param string $scope optional
  27. * @param string $method optional
  28. * @param callable $callback optional
  29. * @return void
  30. * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
  31. */
  32. public function removeListener($scope = null, $method = null, ?callable $callback = null);
  33. }