EventEmitterInterface.php 632 B

12345678910111213141516171819202122
  1. <?php declare(strict_types=1);
  2. /*
  3. * This file is part of Evenement.
  4. *
  5. * (c) Igor Wiedler <igor@wiedler.ch>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Evenement;
  11. interface EventEmitterInterface
  12. {
  13. public function on($event, callable $listener);
  14. public function once($event, callable $listener);
  15. public function removeListener($event, callable $listener);
  16. public function removeAllListeners($event = null);
  17. public function listeners($event = null);
  18. public function emit($event, array $arguments = []);
  19. }