AbstractTextProcessingEvent.php 564 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\TextProcessing\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\TextProcessing\Task;
  10. /**
  11. * @since 27.1.0
  12. */
  13. abstract class AbstractTextProcessingEvent extends Event {
  14. /**
  15. * @since 27.1.0
  16. */
  17. public function __construct(
  18. private Task $task
  19. ) {
  20. parent::__construct();
  21. }
  22. /**
  23. * @return Task
  24. * @since 27.1.0
  25. */
  26. public function getTask(): Task {
  27. return $this->task;
  28. }
  29. }