emitter.php 727 B

1234567891011121314151617181920212223242526272829303132333435
  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. * @return void
  22. */
  23. public function listen($scope, $method, $callback);
  24. /**
  25. * @param string $scope optional
  26. * @param string $method optional
  27. * @param callable $callback optional
  28. * @return void
  29. */
  30. public function removeListener($scope = null, $method = null, $callback = null);
  31. }