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.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index 4850de94ed4..662296b8dd6 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -44,6 +44,7 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Template\ICustomTemplateProvider;
use OCP\Http\WellKnown\IHandler;
use OCP\ILogger;
+use OCP\Notification\INotifier;
use OCP\Search\IProvider;
use OCP\Support\CrashReport\IReporter;
use Throwable;
@@ -90,6 +91,9 @@ class RegistrationContext {
/** @var ServiceRegistration<ICustomTemplateProvider>[] */
private $templateProviders = [];
+ /** @var ServiceRegistration<INotifier>[] */
+ private $notifierServices;
+
/** @var ILogger */
private $logger;
@@ -206,6 +210,13 @@ class RegistrationContext {
$providerClass
);
}
+
+ public function registerNotifierService(string $notifierClass): void {
+ $this->context->registerNotifierService(
+ $this->appId,
+ $notifierClass
+ );
+ }
};
}
@@ -273,6 +284,10 @@ class RegistrationContext {
$this->templateProviders[] = new ServiceRegistration($appId, $class);
}
+ public function registerNotifierService(string $appId, string $class): void {
+ $this->notifierServices[] = new ServiceRegistration($appId, $class);
+ }
+
/**
* @param App[] $apps
*/
@@ -457,4 +472,11 @@ class RegistrationContext {
public function getTemplateProviders(): array {
return $this->templateProviders;
}
+
+ /**
+ * @return ServiceRegistration<INotifier>[]
+ */
+ public function getNotifierServices(): array {
+ return $this->notifierServices;
+ }
}