2020-10-03 09:47:38 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2020-12-16 08:54:15 -05:00
|
|
|
|
2020-10-03 09:47:38 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2020-10-03 09:47:38 -04:00
|
|
|
*/
|
|
|
|
|
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
|
2021-10-19 11:11:53 -04:00
|
|
|
* @return mixed
|
2020-10-03 09:47:38 -04:00
|
|
|
*/
|
2021-10-19 11:11:53 -04:00
|
|
|
#[\ReturnTypeWillChange]
|
2020-10-03 09:47:38 -04:00
|
|
|
final public function jsonSerialize() {
|
|
|
|
|
return $this->getData();
|
|
|
|
|
}
|
|
|
|
|
}
|