| @@ 47-56 (lines=10) @@ | ||
| 44 | * @param string $cache |
|
| 45 | * @param ContainerBuilder $container |
|
| 46 | */ |
|
| 47 | private function setCache($cache, ContainerBuilder $container) |
|
| 48 | { |
|
| 49 | if (!$cache) { |
|
| 50 | return; |
|
| 51 | } |
|
| 52 | ||
| 53 | $container |
|
| 54 | ->getDefinition(self::SERVICE_ID) |
|
| 55 | ->addMethodCall('setCache', [new Reference($cache)]); |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Initialize service configuration. |
|
| @@ 77-86 (lines=10) @@ | ||
| 74 | * @param string $httpClient |
|
| 75 | * @param ContainerBuilder $container |
|
| 76 | */ |
|
| 77 | private function setHttpClient($httpClient, ContainerBuilder $container) |
|
| 78 | { |
|
| 79 | if (!$httpClient) { |
|
| 80 | return; |
|
| 81 | } |
|
| 82 | ||
| 83 | $container |
|
| 84 | ->getDefinition(self::SERVICE_ID) |
|
| 85 | ->addMethodCall('setHttpClient', [new Reference($httpClient)]); |
|
| 86 | } |
|
| 87 | } |
|
| 88 | ||