|
@@ 67-81 (lines=15) @@
|
| 64 |
|
} |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
private function createAtolClientV3(string $name, array $clientConfig, ContainerBuilder $container): void |
| 68 |
|
{ |
| 69 |
|
$definition = new Definition(AtolApiV3::class, [ |
| 70 |
|
new Reference('atol_client.object_converter'), |
| 71 |
|
new Reference($clientConfig['guzzle_client']), |
| 72 |
|
$clientConfig['guzzle_client_options'], |
| 73 |
|
$clientConfig['base_url'], |
| 74 |
|
$clientConfig['cash_register_group_code'], |
| 75 |
|
]); |
| 76 |
|
$definition->setPublic(false); |
| 77 |
|
|
| 78 |
|
$id = 'atol_client.v3.' . $name; |
| 79 |
|
|
| 80 |
|
$container->setDefinition($id, $definition); |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
private function createAtolClientV4(string $name, array $clientConfig, ContainerBuilder $container): void |
| 84 |
|
{ |
|
@@ 83-96 (lines=14) @@
|
| 80 |
|
$container->setDefinition($id, $definition); |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
private function createAtolClientV4(string $name, array $clientConfig, ContainerBuilder $container): void |
| 84 |
|
{ |
| 85 |
|
$definition = new Definition(AtolApiV4::class, [ |
| 86 |
|
new Reference('atol_client.object_converter'), |
| 87 |
|
new Reference($clientConfig['guzzle_client']), |
| 88 |
|
$clientConfig['guzzle_client_options'], |
| 89 |
|
$clientConfig['base_url'], |
| 90 |
|
]); |
| 91 |
|
$definition->setPublic(false); |
| 92 |
|
|
| 93 |
|
$id = 'atol_client.v4.' . $name; |
| 94 |
|
|
| 95 |
|
$container->setDefinition($id, $definition); |
| 96 |
|
} |
| 97 |
|
} |
| 98 |
|
|