ServiceRegistration.php 662 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\AppFramework\Bootstrap;
  8. /**
  9. * @psalm-immutable
  10. * @template T
  11. */
  12. class ServiceRegistration extends ARegistration {
  13. /**
  14. * @var string
  15. * @psalm-var class-string<T>
  16. */
  17. private $service;
  18. /**
  19. * @psalm-param class-string<T> $service
  20. */
  21. public function __construct(string $appId, string $service) {
  22. parent::__construct($appId);
  23. $this->service = $service;
  24. }
  25. /**
  26. * @psalm-return class-string<T>
  27. */
  28. public function getService(): string {
  29. return $this->service;
  30. }
  31. }