| @@ 30-90 (lines=61) @@ | ||
| 27 | * @package Elastification\Client\Request\Shared |
|
| 28 | * @author Daniel Wendlandt |
|
| 29 | */ |
|
| 30 | abstract class AbstractAliasesCatRequest extends AbstractBaseRequest |
|
| 31 | { |
|
| 32 | const REQUEST_ACTION = '_cat'; |
|
| 33 | const CAT_TYPE = 'aliases'; |
|
| 34 | ||
| 35 | ||
| 36 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 37 | { |
|
| 38 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 39 | ||
| 40 | $this->setParameter('format', 'json'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @inheritdoc |
|
| 45 | */ |
|
| 46 | public function getMethod() |
|
| 47 | { |
|
| 48 | return RequestMethods::GET; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @inheritdoc |
|
| 53 | */ |
|
| 54 | public function getAction() |
|
| 55 | { |
|
| 56 | return self::CAT_TYPE; |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * @inheritdoc |
|
| 61 | */ |
|
| 62 | public function getIndex() |
|
| 63 | { |
|
| 64 | return self::REQUEST_ACTION; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @inheritdoc |
|
| 69 | */ |
|
| 70 | public function getType() |
|
| 71 | { |
|
| 72 | return null; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * @inheritdoc |
|
| 77 | */ |
|
| 78 | public function getBody() |
|
| 79 | { |
|
| 80 | return null; |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * @inheritdoc |
|
| 85 | */ |
|
| 86 | public function setBody($body) |
|
| 87 | { |
|
| 88 | //do nothing |
|
| 89 | } |
|
| 90 | } |
|
| 91 | ||
| @@ 30-89 (lines=60) @@ | ||
| 27 | * @package Elastification\Client\Request\Shared |
|
| 28 | * @author Daniel Wendlandt |
|
| 29 | */ |
|
| 30 | abstract class AbstractAllocationCatRequest extends AbstractBaseRequest |
|
| 31 | { |
|
| 32 | const REQUEST_ACTION = '_cat'; |
|
| 33 | const CAT_TYPE = 'allocation'; |
|
| 34 | ||
| 35 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 36 | { |
|
| 37 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 38 | ||
| 39 | $this->setParameter('format', 'json'); |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @inheritdoc |
|
| 44 | */ |
|
| 45 | public function getMethod() |
|
| 46 | { |
|
| 47 | return RequestMethods::GET; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * @inheritdoc |
|
| 52 | */ |
|
| 53 | public function getAction() |
|
| 54 | { |
|
| 55 | return self::CAT_TYPE; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * @inheritdoc |
|
| 60 | */ |
|
| 61 | public function getIndex() |
|
| 62 | { |
|
| 63 | return self::REQUEST_ACTION; |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @inheritdoc |
|
| 68 | */ |
|
| 69 | public function getType() |
|
| 70 | { |
|
| 71 | return null; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @inheritdoc |
|
| 76 | */ |
|
| 77 | public function getBody() |
|
| 78 | { |
|
| 79 | return null; |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * @inheritdoc |
|
| 84 | */ |
|
| 85 | public function setBody($body) |
|
| 86 | { |
|
| 87 | //do nothing |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractCountCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'count'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractFielddataCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'fielddata'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractHealthCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'health'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractIndicesCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'indices'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractMasterCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'master'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractNodesCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'nodes'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractPendingTasksCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'pending_tasks'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractPluginsCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'plugins'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractRecoveryCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'recovery'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractSegmentsCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'segments'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractShardsCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'shards'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 24-83 (lines=60) @@ | ||
| 21 | use Elastification\Client\Request\Shared\AbstractBaseRequest; |
|
| 22 | use Elastification\Client\Serializer\SerializerInterface; |
|
| 23 | ||
| 24 | abstract class AbstractThreadPoolCatRequest extends AbstractBaseRequest |
|
| 25 | { |
|
| 26 | const REQUEST_ACTION = '_cat'; |
|
| 27 | const CAT_TYPE = 'thread_pool'; |
|
| 28 | ||
| 29 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
| 30 | { |
|
| 31 | parent::__construct($index, $type, $serializer, $serializerParams); |
|
| 32 | ||
| 33 | $this->setParameter('format', 'json'); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @inheritdoc |
|
| 38 | */ |
|
| 39 | public function getMethod() |
|
| 40 | { |
|
| 41 | return RequestMethods::GET; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @inheritdoc |
|
| 46 | */ |
|
| 47 | public function getAction() |
|
| 48 | { |
|
| 49 | return self::CAT_TYPE; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| 54 | */ |
|
| 55 | public function getIndex() |
|
| 56 | { |
|
| 57 | return self::REQUEST_ACTION; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @inheritdoc |
|
| 62 | */ |
|
| 63 | public function getType() |
|
| 64 | { |
|
| 65 | return null; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @inheritdoc |
|
| 70 | */ |
|
| 71 | public function getBody() |
|
| 72 | { |
|
| 73 | return null; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @inheritdoc |
|
| 78 | */ |
|
| 79 | public function setBody($body) |
|
| 80 | { |
|
| 81 | //do nothing |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||