1
0

AbstractTaskProcessingEvent.php 573 B

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