1 | <?php |
||
15 | class Status |
||
16 | { |
||
17 | /** |
||
18 | * Contains all status infos. |
||
19 | * |
||
20 | * @var \Elastica\Response Response object |
||
21 | */ |
||
22 | protected $_response; |
||
23 | |||
24 | /** |
||
25 | * Data. |
||
26 | * |
||
27 | * @var array Data |
||
28 | */ |
||
29 | protected $_data; |
||
30 | |||
31 | /** |
||
32 | * Client object. |
||
33 | * |
||
34 | * @var \Elastica\Client Client object |
||
35 | */ |
||
36 | protected $_client; |
||
37 | |||
38 | /** |
||
39 | * Constructs Status object. |
||
40 | * |
||
41 | * @param \Elastica\Client $client Client object |
||
42 | */ |
||
43 | public function __construct(Client $client) |
||
47 | |||
48 | /** |
||
49 | * Returns status data. |
||
50 | * |
||
51 | * @return array Status data |
||
52 | */ |
||
53 | public function getData() |
||
61 | |||
62 | /** |
||
63 | * Returns a list of the existing index names. |
||
64 | * |
||
65 | * @return array Index names list |
||
66 | */ |
||
67 | public function getIndexNames() |
||
73 | |||
74 | /** |
||
75 | * Checks if the given index exists. |
||
76 | * |
||
77 | * @param string $name Index name to check |
||
78 | * |
||
79 | * @return bool True if index exists |
||
80 | */ |
||
81 | public function indexExists($name) |
||
85 | |||
86 | /** |
||
87 | * Checks if the given alias exists. |
||
88 | * |
||
89 | * @param string $name Alias name |
||
90 | * |
||
91 | * @return bool True if alias exists |
||
92 | */ |
||
93 | public function aliasExists($name) |
||
97 | |||
98 | /** |
||
99 | * Returns an array with all indices that the given alias name points to. |
||
100 | * |
||
101 | * @param string $alias Alias name |
||
102 | * |
||
103 | * @return array|\Elastica\Index[] List of Elastica\Index |
||
104 | */ |
||
105 | public function getIndicesWithAlias($alias) |
||
129 | |||
130 | /** |
||
131 | * Returns response object. |
||
132 | * |
||
133 | * @return \Elastica\Response Response object |
||
134 | */ |
||
135 | public function getResponse() |
||
143 | |||
144 | /** |
||
145 | * Return shards info. |
||
146 | * |
||
147 | * @return array Shards info |
||
148 | */ |
||
149 | public function getShards() |
||
155 | |||
156 | /** |
||
157 | * Refresh status object. |
||
158 | */ |
||
159 | public function refresh() |
||
164 | } |
||
165 |