| 1 | <?php |
||
| 8 | class SingleEndpointFactory implements EndpointFactory |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var Endpoint |
||
| 13 | */ |
||
| 14 | private $singleEndpoint; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * SingleEndpointFactory constructor. |
||
| 18 | * @param Endpoint $singleEndpoint |
||
| 19 | */ |
||
| 20 | 2 | public function __construct(Endpoint $singleEndpoint) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $name |
||
| 27 | * @param string $version |
||
| 28 | * @return Endpoint |
||
| 29 | * @throws UnknownEndpointException |
||
| 30 | */ |
||
| 31 | 1 | public function getEndpoint(string $name, string $version): Endpoint |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $version |
||
| 38 | * @return string[] |
||
| 39 | */ |
||
| 40 | 1 | public function getSupportedEndpoints(string $version): array |
|
| 44 | } |
||
| 45 |