1 | <?php |
||
30 | abstract class AbstractUpdateDocumentRequest extends AbstractBaseRequest |
||
31 | { |
||
32 | /** |
||
33 | * @var null|string |
||
34 | */ |
||
35 | private $body = null; |
||
36 | |||
37 | /** |
||
38 | * @var null|string |
||
39 | */ |
||
40 | private $id = null; |
||
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | 3 | public function getMethod() |
|
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | 6 | public function getAction() |
|
54 | { |
||
55 | 6 | if (null === $this->id) { |
|
56 | 3 | throw new RequestException('id can not be empty for this request'); |
|
57 | } |
||
58 | |||
59 | 3 | return $this->id; |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | 3 | public function getBody() |
|
69 | |||
70 | /** |
||
71 | * @inheritdoc |
||
72 | */ |
||
73 | 6 | public function setBody($body) |
|
81 | |||
82 | /** |
||
83 | * Sets the document id |
||
84 | * |
||
85 | * @param null|string $id |
||
86 | * |
||
87 | * @throws \Elastification\Client\Exception\RequestException |
||
88 | * @author Daniel Wendlandt |
||
89 | */ |
||
90 | 6 | public function setId($id) |
|
98 | |||
99 | } |
||
100 |