1 | <?php |
||
25 | class Client extends BaseClient |
||
26 | { |
||
27 | /** |
||
28 | * Stores created indexes to avoid recreation. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | private $indexCache = []; |
||
33 | |||
34 | /** |
||
35 | * Symfony's debugging Stopwatch. |
||
36 | * |
||
37 | * @var Stopwatch|null |
||
38 | */ |
||
39 | private $stopwatch; |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 1 | public function request($path, $method = Request::GET, $data = [], array $query = [], $contentType = Request::DEFAULT_CONTENT_TYPE) |
|
65 | |||
66 | /** |
||
67 | * @param string $name |
||
68 | * |
||
69 | * @return Index|mixed |
||
70 | */ |
||
71 | public function getIndex($name) |
||
79 | |||
80 | /** |
||
81 | * Sets a stopwatch instance for debugging purposes. |
||
82 | * |
||
83 | * @param Stopwatch $stopwatch |
||
84 | */ |
||
85 | public function setStopwatch(Stopwatch $stopwatch = null) |
||
89 | |||
90 | /** |
||
91 | * Log the query if we have an instance of ElasticaLogger. |
||
92 | * |
||
93 | * @param string $path |
||
94 | * @param string $method |
||
95 | * @param array $data |
||
96 | * @param array $query |
||
97 | * @param int $queryTime |
||
98 | * @param int $engineMS |
||
99 | * @param int $itemCount |
||
100 | */ |
||
101 | 1 | private function logQuery($path, $method, $data, array $query, $queryTime, $engineMS = 0, $itemCount = 0) |
|
120 | } |
||
121 |