| 1 | <?php declare(strict_types=1); |
||
| 13 | class Endpoint extends OperatorResource |
||
| 14 | { |
||
| 15 | use HydratorStrategyTrait; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | public $adminUrl; |
||
| 19 | |||
| 20 | /** @var string */ |
||
| 21 | public $region; |
||
| 22 | |||
| 23 | /** @var string */ |
||
| 24 | public $internalUrl; |
||
| 25 | |||
| 26 | /** @var string */ |
||
| 27 | public $publicUrl; |
||
| 28 | |||
| 29 | protected $aliases = [ |
||
| 30 | 'adminURL' => 'adminUrl', |
||
| 31 | 'internalURL' => 'internalUrl', |
||
| 32 | 'publicURL' => 'publicUrl', |
||
| 33 | ]; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Indicates whether a given region is supported |
||
| 37 | * |
||
| 38 | * @param string $region |
||
| 39 | * |
||
| 40 | * @return bool |
||
| 41 | */ |
||
| 42 | 1 | public function supportsRegion(string $region): bool |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Indicates whether a given URL type is supported |
||
| 49 | * |
||
| 50 | * @param string $urlType |
||
| 51 | * |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | 1 | public function supportsUrlType(string $urlType): bool |
|
| 68 | |||
| 69 | /** |
||
| 70 | * Retrieves a URL for the endpoint based on a specific type. |
||
| 71 | * |
||
| 72 | * @param string $urlType Either "internalURL", "publicURL" or "adminURL" (case insensitive) |
||
| 73 | * |
||
| 74 | * @return bool|string |
||
| 75 | */ |
||
| 76 | 3 | public function getUrl(string $urlType): string |
|
| 94 | } |
||
| 95 |