1 | <?php |
||
16 | class Client extends BaseClient |
||
17 | { |
||
18 | /** |
||
19 | * Stores created indexes to avoid recreation. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | private $indexCache = array(); |
||
24 | |||
25 | /** |
||
26 | * Symfony's debugging Stopwatch. |
||
27 | * |
||
28 | * @var Stopwatch|null |
||
29 | */ |
||
30 | private $stopwatch; |
||
31 | |||
32 | /** |
||
33 | * @param string $path |
||
34 | * @param string $method |
||
35 | * @param array $data |
||
36 | * @param array $query |
||
37 | * |
||
38 | * @return \Elastica\Response |
||
39 | */ |
||
40 | 5 | public function request($path, $method = Request::GET, $data = array(), array $query = array()) |
|
57 | |||
58 | 5 | public function getIndex($name) |
|
66 | |||
67 | /** |
||
68 | * Sets a stopwatch instance for debugging purposes. |
||
69 | * |
||
70 | * @param Stopwatch $stopwatch |
||
71 | */ |
||
72 | 6 | public function setStopwatch(Stopwatch $stopwatch = null) |
|
76 | |||
77 | /** |
||
78 | * Log the query if we have an instance of ElasticaLogger. |
||
79 | * |
||
80 | * @param string $path |
||
81 | * @param string $method |
||
82 | * @param array $data |
||
83 | * @param array $query |
||
84 | * @param int $start |
||
85 | */ |
||
86 | 5 | private function logQuery($path, $method, $data, array $query, $start) |
|
104 | } |
||
105 |