httpClient = $http_client; } /** * {@inheritdoc} */ public function hasDefinition($id) { try { $response = $this->httpClient->request('GET', $this->getFileUri($id)); return $response->getStatusCode() === 200; } catch (GuzzleException $exception) { return FALSE; } } /** * {@inheritdoc} */ protected function getSerializedDefinition($id) { try { $response = $this->httpClient->request('GET', $this->getFileUri($id)); return (string) $response->getBody(); } catch (GuzzleException $exception) { throw new LibraryDefinitionNotFoundException($id, '', 0, $exception); } catch (\RuntimeException $exception) { throw new LibraryDefinitionNotFoundException($id, '', 0, $exception); } } }