diff options
Diffstat (limited to 'lib/private/AppFramework/Bootstrap/RegistrationContext.php')
-rw-r--r-- | lib/private/AppFramework/Bootstrap/RegistrationContext.php | 24 |
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; + } } |