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
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
...@@ -29,4 +29,9 @@ interface ApiClientOptions extends HttpClientOptions, SerializerOptions ...@@ -29,4 +29,9 @@ interface ApiClientOptions extends HttpClientOptions, SerializerOptions
*/ */
public function isCachedClient(); public function isCachedClient();
/**
* @return string
*/
public function getApiClientClass();
} }
\ No newline at end of file
...@@ -17,7 +17,9 @@ class ClientFactory ...@@ -17,7 +17,9 @@ class ClientFactory
$httpClientFactory = new HttpClientFactory(); $httpClientFactory = new HttpClientFactory();
$serializerFactory = new SerializerFactory(); $serializerFactory = new SerializerFactory();
$client = new ClientImplementation( $className = $options->getApiClientClass();
$client = new $className(
$httpClientFactory->createClient($options), $httpClientFactory->createClient($options),
$serializerFactory->createSerializer($options), $serializerFactory->createSerializer($options),
$options->getLogger(), $options->getLogger(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment