| 1 | <?php |
||
| 12 | class GetEntitiesClient implements EntityPageBatchFetcher { |
||
| 13 | |||
| 14 | private $http; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var GetEntitiesInterpreter |
||
| 18 | */ |
||
| 19 | private $responseInterpreter; |
||
| 20 | |||
| 21 | 4 | public function __construct( Http $http ) { |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param string[] $entityIds |
||
| 28 | * @return EntityPage[] |
||
| 29 | */ |
||
| 30 | 4 | public function fetchEntityPages( array $entityIds ): array { |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @param string[] $entityIds |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | 2 | private function constructRequestUrl( array $entityIds ) { |
|
| 48 | |||
| 49 | 2 | private function makeRequest( $url ) { |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $response |
||
| 55 | * @return EntityPage[] |
||
| 56 | */ |
||
| 57 | private function getEntityPagesFromResponse( string $response ) { |
||
| 60 | |||
| 61 | } |