aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Bootstrap/RegistrationContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/Bootstrap/RegistrationContext.php')
-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 12fca23c51f..3e5d70d6f1c 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -72,6 +72,9 @@ class RegistrationContext {
/** @var array[] */
private $initialStates = [];
+ /** @var array[] */
+ private $wellKnownHandlers = [];
+
/** @var ILogger */
private $logger;
@@ -174,6 +177,13 @@ class RegistrationContext {
$class
);
}
+
+ public function registerWellKnownHandler(string $class): void {
+ $this->context->registerWellKnown(
+ $this->appId,
+ $class
+ );
+ }
};
}
@@ -260,6 +270,13 @@ class RegistrationContext {
];
}
+ public function registerWellKnown(string $appId, string $class): void {
+ $this->wellKnownHandlers[] = [
+ 'appId' => $appId,
+ 'class' => $class,
+ ];
+ }
+
/**
* @param App[] $apps
*/
@@ -437,4 +454,11 @@ class RegistrationContext {
public function getInitialStates(): array {
return $this->initialStates;
}
+
+ /**
+ * @return array[]
+ */
+ public function getWellKnownHandlers(): array {
+ return $this->wellKnownHandlers;
+ }
}