1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
4
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
5
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
6
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
7
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
8
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
9
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
10
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
11
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
12
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
13
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14
|
|
|
* |
15
|
|
|
* This software consists of voluntary contributions made by many individuals |
16
|
|
|
* and is licensed under the MIT license. |
17
|
|
|
*/ |
18
|
|
|
namespace Elastification\Client\Request\Shared\Cat; |
19
|
|
|
|
20
|
|
|
use Elastification\Client\Request\RequestMethods; |
21
|
|
|
use Elastification\Client\Request\Shared\AbstractBaseRequest; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Class AbstractCountRequest |
25
|
|
|
* |
26
|
|
|
* @package Elastification\Client\Request\Shared |
27
|
|
|
* @author Daniel Wendlandt |
28
|
|
|
*/ |
29
|
|
|
abstract class AbstractAllocationCatRequest extends AbstractBaseRequest |
30
|
|
|
{ |
31
|
|
|
const REQUEST_ACTION = '_cat'; |
32
|
|
|
const CAT_TYPE = 'allocation'; |
33
|
|
|
|
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @inheritdoc |
37
|
|
|
*/ |
38
|
2 |
|
public function getMethod() |
39
|
|
|
{ |
40
|
2 |
|
return RequestMethods::GET; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @inheritdoc |
45
|
|
|
*/ |
46
|
2 |
|
public function getAction() |
47
|
|
|
{ |
48
|
2 |
|
return self::CAT_TYPE; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @inheritdoc |
53
|
|
|
*/ |
54
|
2 |
|
public function getIndex() |
55
|
|
|
{ |
56
|
2 |
|
return self::REQUEST_ACTION; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @inheritdoc |
61
|
|
|
*/ |
62
|
2 |
|
public function getType() |
63
|
|
|
{ |
64
|
2 |
|
return null; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @inheritdoc |
69
|
|
|
*/ |
70
|
2 |
|
public function getBody() |
71
|
|
|
{ |
72
|
2 |
|
return null; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @inheritdoc |
77
|
|
|
*/ |
78
|
2 |
|
public function setBody($body) |
79
|
|
|
{ |
80
|
|
|
//do nothing |
81
|
2 |
|
} |
82
|
|
|
} |
83
|
|
|
|