diff options
Diffstat (limited to 'lib/public/AppFramework/Services/InitialStateProvider.php')
-rw-r--r-- | lib/public/AppFramework/Services/InitialStateProvider.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Services/InitialStateProvider.php b/lib/public/AppFramework/Services/InitialStateProvider.php new file mode 100644 index 00000000000..d1607bc2262 --- /dev/null +++ b/lib/public/AppFramework/Services/InitialStateProvider.php @@ -0,0 +1,33 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\AppFramework\Services; + +/** + * @since 21.0.0 + */ +abstract class InitialStateProvider implements \JsonSerializable { + /** + * @since 21.0.0 + */ + abstract public function getKey(): string; + + /** + * @since 21.0.0 + */ + abstract public function getData(); + + /** + * @since 21.0.0 + * @return mixed + */ + #[\ReturnTypeWillChange] + final public function jsonSerialize() { + return $this->getData(); + } +} |