1
0

ConsoleEvent.php 973 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 OCP\Console;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * Class ConsoleEvent
  11. *
  12. * @since 9.0.0
  13. */
  14. class ConsoleEvent extends Event {
  15. /**
  16. * @since 9.0.0
  17. * @deprecated 22.0.0
  18. */
  19. public const EVENT_RUN = 'OC\Console\Application::run';
  20. /** @var string */
  21. protected $event;
  22. /** @var string[] */
  23. protected $arguments;
  24. /**
  25. * DispatcherEvent constructor.
  26. *
  27. * @param string $event
  28. * @param string[] $arguments
  29. * @since 9.0.0
  30. */
  31. public function __construct($event, array $arguments) {
  32. $this->event = $event;
  33. $this->arguments = $arguments;
  34. }
  35. /**
  36. * @return string
  37. * @since 9.0.0
  38. */
  39. public function getEvent() {
  40. return $this->event;
  41. }
  42. /**
  43. * @return string[]
  44. * @since 9.0.0
  45. */
  46. public function getArguments() {
  47. return $this->arguments;
  48. }
  49. }