emitter.php 693 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace OC\Hooks;
  9. /**
  10. * Class Emitter
  11. *
  12. * interface for all classes that are able to emit events
  13. *
  14. * @package OC\Hooks
  15. */
  16. interface Emitter {
  17. /**
  18. * @param string $scope
  19. * @param string $method
  20. * @param callable $callback
  21. */
  22. public function listen($scope, $method, $callback);
  23. /**
  24. * @param string $scope optional
  25. * @param string $method optional
  26. * @param callable $callback optional
  27. */
  28. public function removeListener($scope = null, $method = null, $callback = null);
  29. }