indices函数返回的就是 indices 文件夹的 namespace,对应文件在namespace/IndicesNamespace.php,然后后面的函数就相当于文件名,她会拼接在 indices 后面,像我们上面请求的文件就是indices/Analyze.php。具体的拼接就是在 namespace/IndicesNamespace.php 这个里面做的,有一个函数如下
/** * $params['index'] = (string) The name of the index to scope the operation * $params['body'] = (array) Define analyzer/tokenizer parameters and the text on which the analysis should be performed * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html */ publicfunctionanalyze(array$params = []) { //获取$params['index'], $params['body'] $index = $this->extractArgument($params, 'index'); $body = $this->extractArgument($params, 'body');