InitialStateProvider.php 575 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\AppFramework\Services;
  8. /**
  9. * @since 21.0.0
  10. */
  11. abstract class InitialStateProvider implements \JsonSerializable {
  12. /**
  13. * @since 21.0.0
  14. */
  15. abstract public function getKey(): string;
  16. /**
  17. * @since 21.0.0
  18. */
  19. abstract public function getData();
  20. /**
  21. * @since 21.0.0
  22. * @return mixed
  23. */
  24. #[\ReturnTypeWillChange]
  25. final public function jsonSerialize() {
  26. return $this->getData();
  27. }
  28. }