ServiceAliasRegistration.php 937 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. */
  11. class ServiceAliasRegistration extends ARegistration {
  12. /**
  13. * @var string
  14. * @psalm-var string|class-string
  15. */
  16. private $alias;
  17. /**
  18. * @var string
  19. * @psalm-var string|class-string
  20. */
  21. private $target;
  22. /**
  23. * @psalm-param string|class-string $alias
  24. * @paslm-param string|class-string $target
  25. */
  26. public function __construct(string $appId,
  27. string $alias,
  28. string $target) {
  29. parent::__construct($appId);
  30. $this->alias = $alias;
  31. $this->target = $target;
  32. }
  33. /**
  34. * @psalm-return string|class-string
  35. */
  36. public function getAlias(): string {
  37. return $this->alias;
  38. }
  39. /**
  40. * @psalm-return string|class-string
  41. */
  42. public function getTarget(): string {
  43. return $this->target;
  44. }
  45. }