1 | <?php |
||
19 | class Command extends \yii\elasticsearch\Command |
||
20 | { |
||
21 | /** |
||
22 | * @param $index |
||
23 | * @param $type |
||
24 | * @param $data |
||
25 | * @param array $options |
||
26 | * @return mixed |
||
27 | * @throws ErrorException |
||
28 | */ |
||
29 | public function bulk($index, $type, $data, $options = []) |
||
38 | |||
39 | /** |
||
40 | * @param $index |
||
41 | * @param $type |
||
42 | * @param $data |
||
43 | * @return string |
||
44 | * @throws ErrorException |
||
45 | */ |
||
46 | private function formatBulkData($index, $type, $data) |
||
86 | |||
87 | /** |
||
88 | * getMapping with caching support |
||
89 | * |
||
90 | * @param string $index |
||
91 | * @param string $type |
||
92 | * @param string $data |
||
93 | * @throws \yii\base\InvalidConfigException |
||
94 | * @return array |
||
95 | * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-mapping.html |
||
96 | */ |
||
97 | public function getCachedMapping($index = '_all', $type = '_all', $data = 'properties') |
||
116 | |||
117 | /** |
||
118 | * Overridden to return exact type mapping if possible |
||
119 | * |
||
120 | * @param string $index |
||
121 | * @param string $type |
||
122 | * @param string $data Type of data to be retrieved |
||
123 | * @return array |
||
124 | * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-mapping.html |
||
125 | */ |
||
126 | public function getMapping($index = '_all', $type = '_all', $data = 'properties') |
||
134 | } |
||
135 |
As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.