summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-12-18 13:34:04 +0100
committerGitHub <noreply@github.com>2020-12-18 13:34:04 +0100
commitf37e150d1caa0918e3258011f3c9b04ce469bb7c (patch)
tree24eca361971f6ea7e3c586927105da40c8ef8c44 /lib/private/AppFramework
parentfbf25e164d1d508b4e587ebd454f18382d1917ba (diff)
parent6995223b1ed202c7f8e920e83cb5b53efd7ce761 (diff)
downloadnextcloud-server-f37e150d1caa0918e3258011f3c9b04ce469bb7c.tar.gz
nextcloud-server-f37e150d1caa0918e3258011f3c9b04ce469bb7c.zip
Merge pull request #24702 from nextcloud/enhancement/well-known-handler-api
Add well known handlers API
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index 88a3dd05585..d6271f5ce45 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -74,6 +74,9 @@ class RegistrationContext {
/** @var array[] */
private $initialStates = [];
+ /** @var array[] */
+ private $wellKnownHandlers = [];
+
/** @var ILogger */
private $logger;
@@ -176,6 +179,13 @@ class RegistrationContext {
$class
);
}
+
+ public function registerWellKnownHandler(string $class): void {
+ $this->context->registerWellKnown(
+ $this->appId,
+ $class
+ );
+ }
};
}
@@ -262,6 +272,13 @@ class RegistrationContext {
];
}
+ public function registerWellKnown(string $appId, string $class): void {
+ $this->wellKnownHandlers[] = [
+ 'appId' => $appId,
+ 'class' => $class,
+ ];
+ }
+
/**
* @param App[] $apps
*/
@@ -439,4 +456,11 @@ class RegistrationContext {
public function getInitialStates(): array {
return $this->initialStates;
}
+
+ /**
+ * @return array[]
+ */
+ public function getWellKnownHandlers(): array {
+ return $this->wellKnownHandlers;
+ }
}