2021-01-28 08:08:38 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2021-06-04 15:52:51 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-01-28 08:08:38 -05:00
|
|
|
*/
|
|
|
|
|
namespace OC\AppFramework\Bootstrap;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @psalm-immutable
|
|
|
|
|
*/
|
|
|
|
|
class ServiceAliasRegistration extends ARegistration {
|
|
|
|
|
/**
|
2025-11-18 11:36:29 -05:00
|
|
|
* @param class-string $alias
|
|
|
|
|
* @param class-string $target
|
2021-01-28 08:08:38 -05:00
|
|
|
*/
|
2025-11-17 09:32:54 -05:00
|
|
|
public function __construct(
|
|
|
|
|
string $appId,
|
2025-11-18 11:36:29 -05:00
|
|
|
private readonly string $alias,
|
|
|
|
|
private readonly string $target,
|
2025-11-17 09:32:54 -05:00
|
|
|
) {
|
2021-01-28 08:08:38 -05:00
|
|
|
parent::__construct($appId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2025-11-18 11:36:29 -05:00
|
|
|
* @return class-string
|
2021-01-28 08:08:38 -05:00
|
|
|
*/
|
|
|
|
|
public function getAlias(): string {
|
|
|
|
|
return $this->alias;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2025-11-18 11:36:29 -05:00
|
|
|
* @return class-string
|
2021-01-28 08:08:38 -05:00
|
|
|
*/
|
|
|
|
|
public function getTarget(): string {
|
|
|
|
|
return $this->target;
|
|
|
|
|
}
|
|
|
|
|
}
|