1
0

MigratorExecuteSqlEvent.php 664 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\DB;
  8. use OCP\EventDispatcher\Event;
  9. class MigratorExecuteSqlEvent extends Event {
  10. private string $sql;
  11. private int $current;
  12. private int $max;
  13. public function __construct(
  14. string $sql,
  15. int $current,
  16. int $max
  17. ) {
  18. $this->sql = $sql;
  19. $this->current = $current;
  20. $this->max = $max;
  21. }
  22. public function getSql(): string {
  23. return $this->sql;
  24. }
  25. public function getCurrentStep(): int {
  26. return $this->current;
  27. }
  28. public function getMaxStep(): int {
  29. return $this->max;
  30. }
  31. }