aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-01-30 12:10:10 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-01-30 16:08:08 +0100
commit0e6cb988a1cb6e0bc94053816ebb7bdc66e871af (patch)
treea7abf657c978cb6faedc918e41d3b6b8e64c26b6 /lib/public
parent49ae3a3daa3ea479902386792b34359cbc8a8fdf (diff)
downloadnextcloud-server-0e6cb988a1cb6e0bc94053816ebb7bdc66e871af.tar.gz
nextcloud-server-0e6cb988a1cb6e0bc94053816ebb7bdc66e871af.zip
Add a key parameter to the new initial state API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/IInitialStateService.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/public/IInitialStateService.php b/lib/public/IInitialStateService.php
index ff6144e0d45..49096886846 100644
--- a/lib/public/IInitialStateService.php
+++ b/lib/public/IInitialStateService.php
@@ -24,6 +24,8 @@ declare(strict_types=1);
namespace OCP;
+use Closure;
+
/**
* @since 16.0.0
*/
@@ -36,9 +38,10 @@ interface IInitialStateService {
* @since 16.0.0
*
* @param string $appName
+ * @param string $key
* @param bool|int|float|string|array|\JsonSerializable $data
*/
- public function provideInitialState(string $appName, $data);
+ public function provideInitialState(string $appName, string $key, $data): void;
/**
* Allows an app to provide its initial state via a lazy method.
@@ -50,7 +53,8 @@ interface IInitialStateService {
* @since 16.0.0
*
* @param string $appName
- * @param \Closure $closure Has to return an object that implements JsonSerializable
+ * @param string $key
+ * @param Closure $closure returns a primitive or an object that implements JsonSerializable
*/
- public function provideLazyInitialState(string $appName, \Closure $closure);
+ public function provideLazyInitialState(string $appName, string $key, Closure $closure): void;
}