1 | <?php |
||
17 | class Client extends BaseClient |
||
18 | { |
||
19 | /** |
||
20 | * Stores created indexes to avoid recreation. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | private $indexCache = array(); |
||
25 | |||
26 | /** |
||
27 | * Stores created index template to avoid recreation. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | private $indexTemplateCache = array(); |
||
32 | |||
33 | /** |
||
34 | * Symfony's debugging Stopwatch. |
||
35 | * |
||
36 | * @var Stopwatch|null |
||
37 | */ |
||
38 | private $stopwatch; |
||
39 | |||
40 | /** |
||
41 | * @param string $path |
||
42 | * @param string $method |
||
43 | * @param array $data |
||
44 | * @param array $query |
||
45 | * |
||
46 | * @return \Elastica\Response |
||
47 | */ |
||
48 | 1 | public function request($path, $method = Request::GET, $data = array(), array $query = array()) |
|
70 | |||
71 | public function getIndex($name) |
||
79 | |||
80 | public function getIndexTemplate($name) |
||
88 | |||
89 | /** |
||
90 | * Sets a stopwatch instance for debugging purposes. |
||
91 | * |
||
92 | * @param Stopwatch $stopwatch |
||
93 | */ |
||
94 | public function setStopwatch(Stopwatch $stopwatch = null) |
||
98 | |||
99 | /** |
||
100 | * Log the query if we have an instance of ElasticaLogger. |
||
101 | * |
||
102 | * @param string $path |
||
103 | * @param string $method |
||
104 | * @param array $data |
||
105 | * @param array $query |
||
106 | * @param int $start |
||
107 | */ |
||
108 | 1 | private function logQuery($path, $method, $data, array $query, $start, $engineMS = 0, $itemCount = 0) |
|
126 | } |
||
127 |