File tree Expand file tree Collapse file tree 3 files changed +4
-58
lines changed Expand file tree Collapse file tree 3 files changed +4
-58
lines changed Original file line number Diff line number Diff line change @@ -1213,15 +1213,13 @@ public function updateByQuery($params = array())
1213
1213
public function getScript ($ params )
1214
1214
{
1215
1215
$ id = $ this ->extractArgument ($ params , 'id ' );
1216
- $ lang = $ this ->extractArgument ($ params , 'lang ' );
1217
1216
1218
1217
/** @var callback $endpointBuilder */
1219
1218
$ endpointBuilder = $ this ->endpoints ;
1220
1219
1221
1220
/** @var \Elasticsearch\Endpoints\Script\Get $endpoint */
1222
1221
$ endpoint = $ endpointBuilder ('Script\Get ' );
1223
- $ endpoint ->setID ($ id )
1224
- ->setLang ($ lang );
1222
+ $ endpoint ->setID ($ id );
1225
1223
$ endpoint ->setParams ($ params );
1226
1224
1227
1225
return $ this ->performRequest ($ endpoint );
@@ -1238,15 +1236,13 @@ public function getScript($params)
1238
1236
public function deleteScript ($ params )
1239
1237
{
1240
1238
$ id = $ this ->extractArgument ($ params , 'id ' );
1241
- $ lang = $ this ->extractArgument ($ params , 'lang ' );
1242
1239
1243
1240
/** @var callback $endpointBuilder */
1244
1241
$ endpointBuilder = $ this ->endpoints ;
1245
1242
1246
1243
/** @var \Elasticsearch\Endpoints\Script\Delete $endpoint */
1247
1244
$ endpoint = $ endpointBuilder ('Script\Delete ' );
1248
- $ endpoint ->setID ($ id )
1249
- ->setLang ($ lang );
1245
+ $ endpoint ->setID ($ id );
1250
1246
$ endpoint ->setParams ($ params );
1251
1247
1252
1248
return $ this ->performRequest ($ endpoint );
Original file line number Diff line number Diff line change 18
18
*/
19
19
class Delete extends AbstractEndpoint
20
20
{
21
- /** @var string */
22
- private $ lang ;
23
-
24
- /**
25
- * @param string $lang
26
- *
27
- * @return $this
28
- */
29
- public function setLang ($ lang )
30
- {
31
- if (isset ($ lang ) !== true ) {
32
- return $ this ;
33
- }
34
-
35
- $ this ->lang = $ lang ;
36
-
37
- return $ this ;
38
- }
39
-
40
21
/**
41
22
* @throws \Elasticsearch\Common\Exceptions\RuntimeException
42
23
* @return string
43
24
*/
44
25
public function getURI ()
45
26
{
46
- if (isset ($ this ->lang ) !== true ) {
47
- throw new Exceptions \RuntimeException (
48
- 'lang is required for Put '
49
- );
50
- }
51
27
if (isset ($ this ->id ) !== true ) {
52
28
throw new Exceptions \RuntimeException (
53
29
'id is required for put '
54
30
);
55
31
}
56
32
$ id = $ this ->id ;
57
- $ lang = $ this ->lang ;
58
- $ uri = "/_scripts/ $ lang/ $ id " ;
33
+ $ uri = "/_scripts/ $ id " ;
59
34
60
35
return $ uri ;
61
36
}
Original file line number Diff line number Diff line change 18
18
*/
19
19
class Get extends AbstractEndpoint
20
20
{
21
- /** @var string */
22
- private $ lang ;
23
-
24
- /**
25
- * @param string $lang
26
- *
27
- * @return $this
28
- */
29
- public function setLang ($ lang )
30
- {
31
- if (isset ($ lang ) !== true ) {
32
- return $ this ;
33
- }
34
-
35
- $ this ->lang = $ lang ;
36
-
37
- return $ this ;
38
- }
39
-
40
21
/**
41
22
* @throws \Elasticsearch\Common\Exceptions\RuntimeException
42
23
* @return string
43
24
*/
44
25
public function getURI ()
45
26
{
46
- if (isset ($ this ->lang ) !== true ) {
47
- throw new Exceptions \RuntimeException (
48
- 'lang is required for Put '
49
- );
50
- }
51
27
if (isset ($ this ->id ) !== true ) {
52
28
throw new Exceptions \RuntimeException (
53
29
'id is required for put '
54
30
);
55
31
}
56
32
$ id = $ this ->id ;
57
- $ lang = $ this ->lang ;
58
- $ uri = "/_scripts/ $ lang/ $ id " ;
33
+ $ uri = "/_scripts/ $ id " ;
59
34
60
35
return $ uri ;
61
36
}
You can’t perform that action at this time.
0 commit comments