| Total Complexity | 92 |
| Total Lines | 679 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like RegistrationContext often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use RegistrationContext, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 60 | class RegistrationContext { |
||
| 61 | /** @var ServiceRegistration<ICapability>[] */ |
||
| 62 | private $capabilities = []; |
||
| 63 | |||
| 64 | /** @var ServiceRegistration<IReporter>[] */ |
||
| 65 | private $crashReporters = []; |
||
| 66 | |||
| 67 | /** @var ServiceRegistration<IWidget>[] */ |
||
| 68 | private $dashboardPanels = []; |
||
| 69 | |||
| 70 | /** @var ServiceRegistration<ILinkAction>[] */ |
||
| 71 | private $profileLinkActions = []; |
||
| 72 | |||
| 73 | /** @var null|ServiceRegistration<ITalkBackend> */ |
||
| 74 | private $talkBackendRegistration = null; |
||
| 75 | |||
| 76 | /** @var ServiceRegistration<IResourceBackend>[] */ |
||
| 77 | private $calendarResourceBackendRegistrations = []; |
||
| 78 | |||
| 79 | /** @var ServiceRegistration<IRoomBackend>[] */ |
||
| 80 | private $calendarRoomBackendRegistrations = []; |
||
| 81 | |||
| 82 | /** @var ServiceRegistration<IUserMigrator>[] */ |
||
| 83 | private $userMigrators = []; |
||
| 84 | |||
| 85 | /** @var ServiceFactoryRegistration[] */ |
||
| 86 | private $services = []; |
||
| 87 | |||
| 88 | /** @var ServiceAliasRegistration[] */ |
||
| 89 | private $aliases = []; |
||
| 90 | |||
| 91 | /** @var ParameterRegistration[] */ |
||
| 92 | private $parameters = []; |
||
| 93 | |||
| 94 | /** @var EventListenerRegistration[] */ |
||
| 95 | private $eventListeners = []; |
||
| 96 | |||
| 97 | /** @var ServiceRegistration<Middleware>[] */ |
||
| 98 | private $middlewares = []; |
||
| 99 | |||
| 100 | /** @var ServiceRegistration<IProvider>[] */ |
||
| 101 | private $searchProviders = []; |
||
| 102 | |||
| 103 | /** @var ServiceRegistration<IAlternativeLogin>[] */ |
||
| 104 | private $alternativeLogins = []; |
||
| 105 | |||
| 106 | /** @var ServiceRegistration<InitialStateProvider>[] */ |
||
| 107 | private $initialStates = []; |
||
| 108 | |||
| 109 | /** @var ServiceRegistration<IHandler>[] */ |
||
| 110 | private $wellKnownHandlers = []; |
||
| 111 | |||
| 112 | /** @var ServiceRegistration<ICustomTemplateProvider>[] */ |
||
| 113 | private $templateProviders = []; |
||
| 114 | |||
| 115 | /** @var ServiceRegistration<INotifier>[] */ |
||
| 116 | private $notifierServices = []; |
||
| 117 | |||
| 118 | /** @var ServiceRegistration<\OCP\Authentication\TwoFactorAuth\IProvider>[] */ |
||
| 119 | private $twoFactorProviders = []; |
||
| 120 | |||
| 121 | /** @var ServiceRegistration<ICalendarProvider>[] */ |
||
| 122 | private $calendarProviders = []; |
||
| 123 | |||
| 124 | /** @var ServiceRegistration<IReferenceProvider>[] */ |
||
| 125 | private array $referenceProviders = []; |
||
| 126 | |||
| 127 | /** @var ParameterRegistration[] */ |
||
| 128 | private $sensitiveMethods = []; |
||
| 129 | |||
| 130 | /** @var LoggerInterface */ |
||
| 131 | private $logger; |
||
| 132 | |||
| 133 | /** @var PreviewProviderRegistration[] */ |
||
| 134 | private $previewProviders = []; |
||
| 135 | |||
| 136 | public function __construct(LoggerInterface $logger) { |
||
| 137 | $this->logger = $logger; |
||
| 138 | } |
||
| 139 | |||
| 140 | public function for(string $appId): IRegistrationContext { |
||
| 141 | return new class($appId, $this) implements IRegistrationContext { |
||
| 142 | /** @var string */ |
||
| 143 | private $appId; |
||
| 144 | |||
| 145 | /** @var RegistrationContext */ |
||
| 146 | private $context; |
||
| 147 | |||
| 148 | public function __construct(string $appId, RegistrationContext $context) { |
||
| 149 | $this->appId = $appId; |
||
| 150 | $this->context = $context; |
||
| 151 | } |
||
| 152 | |||
| 153 | public function registerCapability(string $capability): void { |
||
| 154 | $this->context->registerCapability( |
||
| 155 | $this->appId, |
||
| 156 | $capability |
||
| 157 | ); |
||
| 158 | } |
||
| 159 | |||
| 160 | public function registerCrashReporter(string $reporterClass): void { |
||
| 161 | $this->context->registerCrashReporter( |
||
| 162 | $this->appId, |
||
| 163 | $reporterClass |
||
| 164 | ); |
||
| 165 | } |
||
| 166 | |||
| 167 | public function registerDashboardWidget(string $widgetClass): void { |
||
| 168 | $this->context->registerDashboardPanel( |
||
| 169 | $this->appId, |
||
| 170 | $widgetClass |
||
| 171 | ); |
||
| 172 | } |
||
| 173 | |||
| 174 | public function registerService(string $name, callable $factory, bool $shared = true): void { |
||
| 175 | $this->context->registerService( |
||
| 176 | $this->appId, |
||
| 177 | $name, |
||
| 178 | $factory, |
||
| 179 | $shared |
||
| 180 | ); |
||
| 181 | } |
||
| 182 | |||
| 183 | public function registerServiceAlias(string $alias, string $target): void { |
||
| 184 | $this->context->registerServiceAlias( |
||
| 185 | $this->appId, |
||
| 186 | $alias, |
||
| 187 | $target |
||
| 188 | ); |
||
| 189 | } |
||
| 190 | |||
| 191 | public function registerParameter(string $name, $value): void { |
||
| 192 | $this->context->registerParameter( |
||
| 193 | $this->appId, |
||
| 194 | $name, |
||
| 195 | $value |
||
| 196 | ); |
||
| 197 | } |
||
| 198 | |||
| 199 | public function registerEventListener(string $event, string $listener, int $priority = 0): void { |
||
| 200 | $this->context->registerEventListener( |
||
| 201 | $this->appId, |
||
| 202 | $event, |
||
| 203 | $listener, |
||
| 204 | $priority |
||
| 205 | ); |
||
| 206 | } |
||
| 207 | |||
| 208 | public function registerMiddleware(string $class): void { |
||
| 209 | $this->context->registerMiddleware( |
||
| 210 | $this->appId, |
||
| 211 | $class |
||
| 212 | ); |
||
| 213 | } |
||
| 214 | |||
| 215 | public function registerSearchProvider(string $class): void { |
||
| 216 | $this->context->registerSearchProvider( |
||
| 217 | $this->appId, |
||
| 218 | $class |
||
| 219 | ); |
||
| 220 | } |
||
| 221 | |||
| 222 | public function registerAlternativeLogin(string $class): void { |
||
| 223 | $this->context->registerAlternativeLogin( |
||
| 224 | $this->appId, |
||
| 225 | $class |
||
| 226 | ); |
||
| 227 | } |
||
| 228 | |||
| 229 | public function registerInitialStateProvider(string $class): void { |
||
| 230 | $this->context->registerInitialState( |
||
| 231 | $this->appId, |
||
| 232 | $class |
||
| 233 | ); |
||
| 234 | } |
||
| 235 | |||
| 236 | public function registerWellKnownHandler(string $class): void { |
||
| 237 | $this->context->registerWellKnown( |
||
| 238 | $this->appId, |
||
| 239 | $class |
||
| 240 | ); |
||
| 241 | } |
||
| 242 | |||
| 243 | public function registerTemplateProvider(string $providerClass): void { |
||
| 244 | $this->context->registerTemplateProvider( |
||
| 245 | $this->appId, |
||
| 246 | $providerClass |
||
| 247 | ); |
||
| 248 | } |
||
| 249 | |||
| 250 | public function registerNotifierService(string $notifierClass): void { |
||
| 251 | $this->context->registerNotifierService( |
||
| 252 | $this->appId, |
||
| 253 | $notifierClass |
||
| 254 | ); |
||
| 255 | } |
||
| 256 | |||
| 257 | public function registerTwoFactorProvider(string $twoFactorProviderClass): void { |
||
| 258 | $this->context->registerTwoFactorProvider( |
||
| 259 | $this->appId, |
||
| 260 | $twoFactorProviderClass |
||
| 261 | ); |
||
| 262 | } |
||
| 263 | |||
| 264 | public function registerPreviewProvider(string $previewProviderClass, string $mimeTypeRegex): void { |
||
| 265 | $this->context->registerPreviewProvider( |
||
| 266 | $this->appId, |
||
| 267 | $previewProviderClass, |
||
| 268 | $mimeTypeRegex |
||
| 269 | ); |
||
| 270 | } |
||
| 271 | |||
| 272 | public function registerCalendarProvider(string $class): void { |
||
| 273 | $this->context->registerCalendarProvider( |
||
| 274 | $this->appId, |
||
| 275 | $class |
||
| 276 | ); |
||
| 277 | } |
||
| 278 | |||
| 279 | public function registerReferenceProvider(string $class): void { |
||
| 280 | $this->context->registerReferenceProvider( |
||
| 281 | $this->appId, |
||
| 282 | $class |
||
| 283 | ); |
||
| 284 | } |
||
| 285 | |||
| 286 | public function registerProfileLinkAction(string $actionClass): void { |
||
| 287 | $this->context->registerProfileLinkAction( |
||
| 288 | $this->appId, |
||
| 289 | $actionClass |
||
| 290 | ); |
||
| 291 | } |
||
| 292 | |||
| 293 | public function registerTalkBackend(string $backend): void { |
||
| 294 | $this->context->registerTalkBackend( |
||
| 295 | $this->appId, |
||
| 296 | $backend |
||
| 297 | ); |
||
| 298 | } |
||
| 299 | |||
| 300 | public function registerCalendarResourceBackend(string $class): void { |
||
| 301 | $this->context->registerCalendarResourceBackend( |
||
| 302 | $this->appId, |
||
| 303 | $class |
||
| 304 | ); |
||
| 305 | } |
||
| 306 | |||
| 307 | public function registerCalendarRoomBackend(string $class): void { |
||
| 308 | $this->context->registerCalendarRoomBackend( |
||
| 309 | $this->appId, |
||
| 310 | $class |
||
| 311 | ); |
||
| 312 | } |
||
| 313 | |||
| 314 | public function registerUserMigrator(string $migratorClass): void { |
||
| 315 | $this->context->registerUserMigrator( |
||
| 316 | $this->appId, |
||
| 317 | $migratorClass |
||
| 318 | ); |
||
| 319 | } |
||
| 320 | |||
| 321 | public function registerSensitiveMethods(string $class, array $methods): void { |
||
| 322 | $this->context->registerSensitiveMethods( |
||
| 323 | $this->appId, |
||
| 324 | $class, |
||
| 325 | $methods |
||
| 326 | ); |
||
| 327 | } |
||
| 328 | }; |
||
| 329 | } |
||
| 330 | |||
| 331 | /** |
||
| 332 | * @psalm-param class-string<ICapability> $capability |
||
| 333 | */ |
||
| 334 | public function registerCapability(string $appId, string $capability): void { |
||
| 335 | $this->capabilities[] = new ServiceRegistration($appId, $capability); |
||
| 336 | } |
||
| 337 | |||
| 338 | /** |
||
| 339 | * @psalm-param class-string<IReporter> $capability |
||
| 340 | */ |
||
| 341 | public function registerCrashReporter(string $appId, string $reporterClass): void { |
||
| 342 | $this->crashReporters[] = new ServiceRegistration($appId, $reporterClass); |
||
| 343 | } |
||
| 344 | |||
| 345 | /** |
||
| 346 | * @psalm-param class-string<IWidget> $capability |
||
| 347 | */ |
||
| 348 | public function registerDashboardPanel(string $appId, string $panelClass): void { |
||
| 349 | $this->dashboardPanels[] = new ServiceRegistration($appId, $panelClass); |
||
| 350 | } |
||
| 351 | |||
| 352 | public function registerService(string $appId, string $name, callable $factory, bool $shared = true): void { |
||
| 353 | $this->services[] = new ServiceFactoryRegistration($appId, $name, $factory, $shared); |
||
| 354 | } |
||
| 355 | |||
| 356 | public function registerServiceAlias(string $appId, string $alias, string $target): void { |
||
| 357 | $this->aliases[] = new ServiceAliasRegistration($appId, $alias, $target); |
||
| 358 | } |
||
| 359 | |||
| 360 | public function registerParameter(string $appId, string $name, $value): void { |
||
| 361 | $this->parameters[] = new ParameterRegistration($appId, $name, $value); |
||
| 362 | } |
||
| 363 | |||
| 364 | public function registerEventListener(string $appId, string $event, string $listener, int $priority = 0): void { |
||
| 365 | $this->eventListeners[] = new EventListenerRegistration($appId, $event, $listener, $priority); |
||
| 366 | } |
||
| 367 | |||
| 368 | /** |
||
| 369 | * @psalm-param class-string<Middleware> $class |
||
| 370 | */ |
||
| 371 | public function registerMiddleware(string $appId, string $class): void { |
||
| 372 | $this->middlewares[] = new ServiceRegistration($appId, $class); |
||
| 373 | } |
||
| 374 | |||
| 375 | public function registerSearchProvider(string $appId, string $class) { |
||
| 376 | $this->searchProviders[] = new ServiceRegistration($appId, $class); |
||
| 377 | } |
||
| 378 | |||
| 379 | public function registerAlternativeLogin(string $appId, string $class): void { |
||
| 380 | $this->alternativeLogins[] = new ServiceRegistration($appId, $class); |
||
| 381 | } |
||
| 382 | |||
| 383 | public function registerInitialState(string $appId, string $class): void { |
||
| 384 | $this->initialStates[] = new ServiceRegistration($appId, $class); |
||
| 385 | } |
||
| 386 | |||
| 387 | public function registerWellKnown(string $appId, string $class): void { |
||
| 388 | $this->wellKnownHandlers[] = new ServiceRegistration($appId, $class); |
||
| 389 | } |
||
| 390 | |||
| 391 | public function registerTemplateProvider(string $appId, string $class): void { |
||
| 392 | $this->templateProviders[] = new ServiceRegistration($appId, $class); |
||
| 393 | } |
||
| 394 | |||
| 395 | public function registerNotifierService(string $appId, string $class): void { |
||
| 396 | $this->notifierServices[] = new ServiceRegistration($appId, $class); |
||
| 397 | } |
||
| 398 | |||
| 399 | public function registerTwoFactorProvider(string $appId, string $class): void { |
||
| 400 | $this->twoFactorProviders[] = new ServiceRegistration($appId, $class); |
||
| 401 | } |
||
| 402 | |||
| 403 | public function registerPreviewProvider(string $appId, string $class, string $mimeTypeRegex): void { |
||
| 404 | $this->previewProviders[] = new PreviewProviderRegistration($appId, $class, $mimeTypeRegex); |
||
| 405 | } |
||
| 406 | |||
| 407 | public function registerCalendarProvider(string $appId, string $class): void { |
||
| 408 | $this->calendarProviders[] = new ServiceRegistration($appId, $class); |
||
| 409 | } |
||
| 410 | |||
| 411 | public function registerReferenceProvider(string $appId, string $class): void { |
||
| 412 | $this->referenceProviders[] = new ServiceRegistration($appId, $class); |
||
| 413 | } |
||
| 414 | |||
| 415 | /** |
||
| 416 | * @psalm-param class-string<ILinkAction> $actionClass |
||
| 417 | */ |
||
| 418 | public function registerProfileLinkAction(string $appId, string $actionClass): void { |
||
| 419 | $this->profileLinkActions[] = new ServiceRegistration($appId, $actionClass); |
||
| 420 | } |
||
| 421 | |||
| 422 | /** |
||
| 423 | * @psalm-param class-string<ITalkBackend> $backend |
||
| 424 | */ |
||
| 425 | public function registerTalkBackend(string $appId, string $backend) { |
||
| 435 | } |
||
| 436 | |||
| 437 | public function registerCalendarResourceBackend(string $appId, string $class) { |
||
| 438 | $this->calendarResourceBackendRegistrations[] = new ServiceRegistration( |
||
| 439 | $appId, |
||
| 440 | $class, |
||
| 441 | ); |
||
| 442 | } |
||
| 443 | |||
| 444 | public function registerCalendarRoomBackend(string $appId, string $class) { |
||
| 445 | $this->calendarRoomBackendRegistrations[] = new ServiceRegistration( |
||
| 446 | $appId, |
||
| 447 | $class, |
||
| 448 | ); |
||
| 449 | } |
||
| 450 | |||
| 451 | /** |
||
| 452 | * @psalm-param class-string<IUserMigrator> $migratorClass |
||
| 453 | */ |
||
| 454 | public function registerUserMigrator(string $appId, string $migratorClass): void { |
||
| 456 | } |
||
| 457 | |||
| 458 | public function registerSensitiveMethods(string $appId, string $class, array $methods): void { |
||
| 459 | $methods = array_filter($methods, 'is_string'); |
||
| 460 | $this->sensitiveMethods[] = new ParameterRegistration($appId, $class, $methods); |
||
| 461 | } |
||
| 462 | |||
| 463 | /** |
||
| 464 | * @param App[] $apps |
||
| 465 | */ |
||
| 466 | public function delegateCapabilityRegistrations(array $apps): void { |
||
| 467 | while (($registration = array_shift($this->capabilities)) !== null) { |
||
|
|
|||
| 468 | $appId = $registration->getAppId(); |
||
| 469 | if (!isset($apps[$appId])) { |
||
| 470 | // If we land here something really isn't right. But at least we caught the |
||
| 471 | // notice that is otherwise emitted for the undefined index |
||
| 472 | $this->logger->error("App $appId not loaded for the capability registration"); |
||
| 473 | |||
| 474 | continue; |
||
| 475 | } |
||
| 476 | |||
| 477 | try { |
||
| 478 | $apps[$appId] |
||
| 479 | ->getContainer() |
||
| 480 | ->registerCapability($registration->getService()); |
||
| 481 | } catch (Throwable $e) { |
||
| 482 | $this->logger->error("Error during capability registration of $appId: " . $e->getMessage(), [ |
||
| 483 | 'exception' => $e, |
||
| 484 | ]); |
||
| 485 | } |
||
| 486 | } |
||
| 487 | } |
||
| 488 | |||
| 489 | /** |
||
| 490 | * @param App[] $apps |
||
| 491 | */ |
||
| 492 | public function delegateCrashReporterRegistrations(array $apps, Registry $registry): void { |
||
| 493 | while (($registration = array_shift($this->crashReporters)) !== null) { |
||
| 494 | try { |
||
| 495 | $registry->registerLazy($registration->getService()); |
||
| 496 | } catch (Throwable $e) { |
||
| 497 | $appId = $registration->getAppId(); |
||
| 498 | $this->logger->error("Error during crash reporter registration of $appId: " . $e->getMessage(), [ |
||
| 499 | 'exception' => $e, |
||
| 500 | ]); |
||
| 501 | } |
||
| 502 | } |
||
| 503 | } |
||
| 504 | |||
| 505 | /** |
||
| 506 | * @param App[] $apps |
||
| 507 | */ |
||
| 508 | public function delegateDashboardPanelRegistrations(IManager $dashboardManager): void { |
||
| 516 | ]); |
||
| 517 | } |
||
| 518 | } |
||
| 519 | } |
||
| 520 | |||
| 521 | public function delegateEventListenerRegistrations(IEventDispatcher $eventDispatcher): void { |
||
| 522 | while (($registration = array_shift($this->eventListeners)) !== null) { |
||
| 523 | try { |
||
| 524 | $eventDispatcher->addServiceListener( |
||
| 525 | $registration->getEvent(), |
||
| 526 | $registration->getService(), |
||
| 527 | $registration->getPriority() |
||
| 528 | ); |
||
| 529 | } catch (Throwable $e) { |
||
| 530 | $appId = $registration->getAppId(); |
||
| 531 | $this->logger->error("Error during event listener registration of $appId: " . $e->getMessage(), [ |
||
| 532 | 'exception' => $e, |
||
| 533 | ]); |
||
| 534 | } |
||
| 535 | } |
||
| 536 | } |
||
| 537 | |||
| 538 | /** |
||
| 539 | * @param App[] $apps |
||
| 540 | */ |
||
| 541 | public function delegateContainerRegistrations(array $apps): void { |
||
| 542 | while (($registration = array_shift($this->services)) !== null) { |
||
| 543 | $appId = $registration->getAppId(); |
||
| 544 | if (!isset($apps[$appId])) { |
||
| 545 | // If we land here something really isn't right. But at least we caught the |
||
| 614 | ]); |
||
| 615 | } |
||
| 616 | } |
||
| 617 | } |
||
| 618 | |||
| 619 | /** |
||
| 620 | * @return ServiceRegistration<Middleware>[] |
||
| 621 | */ |
||
| 622 | public function getMiddlewareRegistrations(): array { |
||
| 623 | return $this->middlewares; |
||
| 624 | } |
||
| 625 | |||
| 626 | /** |
||
| 627 | * @return ServiceRegistration<IProvider>[] |
||
| 628 | */ |
||
| 629 | public function getSearchProviders(): array { |
||
| 630 | return $this->searchProviders; |
||
| 631 | } |
||
| 632 | |||
| 633 | /** |
||
| 634 | * @return ServiceRegistration<IAlternativeLogin>[] |
||
| 635 | */ |
||
| 636 | public function getAlternativeLogins(): array { |
||
| 637 | return $this->alternativeLogins; |
||
| 638 | } |
||
| 639 | |||
| 640 | /** |
||
| 641 | * @return ServiceRegistration<InitialStateProvider>[] |
||
| 642 | */ |
||
| 643 | public function getInitialStates(): array { |
||
| 644 | return $this->initialStates; |
||
| 645 | } |
||
| 646 | |||
| 647 | /** |
||
| 648 | * @return ServiceRegistration<IHandler>[] |
||
| 649 | */ |
||
| 650 | public function getWellKnownHandlers(): array { |
||
| 652 | } |
||
| 653 | |||
| 654 | /** |
||
| 655 | * @return ServiceRegistration<ICustomTemplateProvider>[] |
||
| 656 | */ |
||
| 657 | public function getTemplateProviders(): array { |
||
| 658 | return $this->templateProviders; |
||
| 659 | } |
||
| 660 | |||
| 661 | /** |
||
| 662 | * @return ServiceRegistration<INotifier>[] |
||
| 663 | */ |
||
| 664 | public function getNotifierServices(): array { |
||
| 665 | return $this->notifierServices; |
||
| 666 | } |
||
| 667 | |||
| 668 | /** |
||
| 669 | * @return ServiceRegistration<\OCP\Authentication\TwoFactorAuth\IProvider>[] |
||
| 670 | */ |
||
| 671 | public function getTwoFactorProviders(): array { |
||
| 672 | return $this->twoFactorProviders; |
||
| 673 | } |
||
| 674 | |||
| 675 | /** |
||
| 676 | * @return PreviewProviderRegistration[] |
||
| 677 | */ |
||
| 678 | public function getPreviewProviders(): array { |
||
| 679 | return $this->previewProviders; |
||
| 680 | } |
||
| 681 | |||
| 682 | /** |
||
| 683 | * @return ServiceRegistration<ICalendarProvider>[] |
||
| 684 | */ |
||
| 685 | public function getCalendarProviders(): array { |
||
| 686 | return $this->calendarProviders; |
||
| 687 | } |
||
| 688 | |||
| 689 | /** |
||
| 690 | * @return ServiceRegistration<IReferenceProvider>[] |
||
| 691 | */ |
||
| 692 | public function getReferenceProviders(): array { |
||
| 693 | return $this->referenceProviders; |
||
| 694 | } |
||
| 695 | |||
| 696 | /** |
||
| 697 | * @return ServiceRegistration<ILinkAction>[] |
||
| 698 | */ |
||
| 699 | public function getProfileLinkActions(): array { |
||
| 700 | return $this->profileLinkActions; |
||
| 701 | } |
||
| 702 | |||
| 703 | /** |
||
| 704 | * @return ServiceRegistration|null |
||
| 705 | * @psalm-return ServiceRegistration<ITalkBackend>|null |
||
| 706 | */ |
||
| 707 | public function getTalkBackendRegistration(): ?ServiceRegistration { |
||
| 708 | return $this->talkBackendRegistration; |
||
| 709 | } |
||
| 710 | |||
| 711 | /** |
||
| 712 | * @return ServiceRegistration[] |
||
| 713 | * @psalm-return ServiceRegistration<IResourceBackend>[] |
||
| 714 | */ |
||
| 715 | public function getCalendarResourceBackendRegistrations(): array { |
||
| 717 | } |
||
| 718 | |||
| 719 | /** |
||
| 720 | * @return ServiceRegistration[] |
||
| 721 | * @psalm-return ServiceRegistration<IRoomBackend>[] |
||
| 722 | */ |
||
| 723 | public function getCalendarRoomBackendRegistrations(): array { |
||
| 724 | return $this->calendarRoomBackendRegistrations; |
||
| 725 | } |
||
| 726 | |||
| 727 | /** |
||
| 728 | * @return ServiceRegistration<IUserMigrator>[] |
||
| 729 | */ |
||
| 730 | public function getUserMigrators(): array { |
||
| 732 | } |
||
| 733 | |||
| 734 | /** |
||
| 735 | * @return ParameterRegistration[] |
||
| 736 | */ |
||
| 737 | public function getSensitiveMethods(): array { |
||
| 738 | return $this->sensitiveMethods; |
||
| 739 | } |
||
| 740 | } |
||
| 741 |