Skip to content
Snippets Groups Projects
Commit b48bcdfb authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Api class

parent f6839ba7
No related branches found
No related tags found
1 merge request!2Feature/log context
Pipeline #5006 passed
......@@ -29,4 +29,9 @@ interface ApiClientOptions extends HttpClientOptions, SerializerOptions
*/
public function isCachedClient();
/**
* @return string
*/
public function getApiClientClass();
}
\ No newline at end of file
......@@ -17,7 +17,9 @@ class ClientFactory
$httpClientFactory = new HttpClientFactory();
$serializerFactory = new SerializerFactory();
$client = new ClientImplementation(
$className = $options->getApiClientClass();
$client = new $className(
$httpClientFactory->createClient($options),
$serializerFactory->createSerializer($options),
$options->getLogger(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment