|
2 | 2 |
|
3 | 3 | namespace Frdlweb\Contract\Autoload;
|
4 | 4 |
|
5 |
| - interface CodebaseInterface |
| 5 | +interface CodebaseInterface |
6 | 6 | {
|
| 7 | + const ALL_CHANNELS = '*'; |
| 8 | + const ENDPOINT_DEFAULT = 'RemoteApiBaseUrl'; |
| 9 | + const ENDPOINT_PROVIDER_IDENTITY_CENTRAL = 'io4.pid.central'; |
| 10 | + const ENDPOINT_WEBFAT_CENTRAL = 'io4.webfat.central'; |
| 11 | + const ENDPOINT_REMOTE_PUBLIC = 'io4.workspace.public'; |
| 12 | + const ENDPOINT_REMOTE_PRIVATE = 'io4.workspace.private'; |
| 13 | + const ENDPOINT_WORKSPACE_REMOTE = 'io4.workspace.remote'; |
| 14 | + const ENDPOINT_INSTALLER_REMOTE = 'io4.installer.remote'; |
| 15 | + const ENDPOINT_PROXY_OBJECT_REMOTE = 'io4.proxy-object.remote'; |
| 16 | + const ENDPOINT_CONTAINER_REMOTE = 'io4.container.remote'; |
| 17 | + const ENDPOINT_CONFIG_REMOTE = 'io4.config.remote'; |
| 18 | + const ENDPOINT_MODULES_WEBFANSCRIPT_REMOTE = 'RemoteModulesBaseUrl'; |
| 19 | + const ENDPOINT_AUTOLOADER_PSR4_REMOTE = 'RemotePsr4UrlTemplate'; |
| 20 | + const ENDPOINT_UDAP = 'io4.udap'; |
| 21 | + const ENDPOINT_RDAP = 'io4.rdap'; |
| 22 | + const ENDPOINT_OIDIP = 'io4.rdap'; |
| 23 | + |
7 | 24 | const CHANNEL_LATEST = 'latest';
|
8 | 25 | const CHANNEL_STABLE = 'stable';
|
9 | 26 | const CHANNEL_FALLBACK = 'fallback';
|
| 27 | + const CHANNEL_TEST = 'test'; |
10 | 28 | const CHANNELS =[
|
11 | 29 | self::CHANNEL_LATEST => self::CHANNEL_LATEST,
|
12 | 30 | self::CHANNEL_STABLE => self::CHANNEL_STABLE,
|
13 | 31 | self::CHANNEL_FALLBACK => self::CHANNEL_FALLBACK,
|
| 32 | + self::CHANNEL_TEST => self::CHANNEL_TEST, |
14 | 33 | ];
|
15 |
| - |
16 |
| - public function setUpdateChannel(string $channel); |
17 |
| - public function getUpdateChannel() : string; |
18 |
| - public function getRemotePsr4UrlTemplate() : string; |
| 34 | + const DEFAULT_ENDPOINT_NAMES =[ |
| 35 | + self::ENDPOINT_DEFAULT, |
| 36 | + self::ENDPOINT_PROVIDER_IDENTITY_CENTRAL, |
| 37 | + self::ENDPOINT_WEBFAT_CENTRAL, |
| 38 | + self::ENDPOINT_REMOTE_PUBLIC, |
| 39 | + self::ENDPOINT_REMOTE_PRIVATE, |
| 40 | + self::ENDPOINT_WORKSPACE_REMOTE, |
| 41 | + self::ENDPOINT_INSTALLER_REMOTE, |
| 42 | + self::ENDPOINT_MODULES_WEBFANSCRIPT_REMOTE, |
| 43 | + self::ENDPOINT_PROXY_OBJECT_REMOTE, |
| 44 | + self::ENDPOINT_CONTAINER_REMOTE, |
| 45 | + self::ENDPOINT_AUTOLOADER_PSR4_REMOTE, |
| 46 | + self::ENDPOINT_UDAP, |
| 47 | + self::ENDPOINT_RDAP, |
| 48 | + self::ENDPOINT_OIDIP, |
| 49 | + self::ENDPOINT_CONFIG_REMOTE, |
| 50 | + ]; |
| 51 | + |
| 52 | + public function loadUpdateChannel(mixed $StubRunner = null) : string; |
| 53 | + public function getRemoteApiBaseUrl(?string $serviceEndpoint = self::ENDPOINT_DEFAULT) : string|bool; |
| 54 | + public function setUpdateChannel(string $channel); |
| 55 | + public function getUpdateChannel() : string; |
| 56 | + public function getRemotePsr4UrlTemplate() : string; |
19 | 57 | public function getRemoteModulesBaseUrl() : string;
|
20 |
| - public function loadUpdateChannel(mixed $StubRunner = null) : string; |
| 58 | + public function getServiceEndpoints() : array; |
| 59 | + public function getServiceEndpointNames() : array; |
| 60 | + public function setServiceEndpoints(array $serviceEndpoints) : CodebaseInterface; |
| 61 | + public function setServiceEndpoint(string $serviceEndpointName, |
| 62 | + string|\Closure|\callable $baseUrl, |
| 63 | + ?string $channel = self::ALL_CHANNELS) : CodebaseInterface; |
21 | 64 | }
|
22 | 65 |
|
23 | 66 |
|
0 commit comments