Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class SolrLogger |
||
13 | { |
||
14 | /** |
||
15 | * @var Client |
||
16 | */ |
||
17 | protected $client; |
||
18 | |||
19 | public function __construct() |
||
20 | { |
||
21 | $config = SolrCoreService::config()->get('config'); |
||
22 | $this->client = new Client( |
||
23 | [ |
||
24 | 'base_uri' => $config['endpoint']['host'] . ':' . $config['endpoint']['host']['port'] |
||
25 | ] |
||
26 | ); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param string $type |
||
31 | * @param null|string $index |
||
32 | * @throws GuzzleException |
||
33 | * @throws ValidationException |
||
34 | */ |
||
35 | public function saveSolrLog($type = 'Query', $index = null): void |
||
59 | } |
||
60 | } |
||
63 |