1 | <?php |
||
15 | class WriteOperation implements OperationInterface |
||
16 | { |
||
17 | /** |
||
18 | * Data to write |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | private $data; |
||
23 | |||
24 | /** |
||
25 | * WriteOperation constructor. |
||
26 | * |
||
27 | * @param string $data Data to send |
||
28 | */ |
||
29 | 26 | public function __construct($data = null) |
|
33 | |||
34 | |||
35 | /** {@inheritdoc} */ |
||
36 | 53 | public function getType() |
|
40 | |||
41 | /** |
||
42 | * Return Data |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | 12 | public function getData() |
|
50 | |||
51 | /** |
||
52 | * Sets Data |
||
53 | * |
||
54 | * @param string $data Data to send |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | 9 | public function setData($data) |
|
62 | |||
63 | /** |
||
64 | * Checks whether request has data |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | 34 | public function hasData() |
|
72 | |||
73 | /** |
||
74 | * Clear send data |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | 1 | public function clearData() |
|
82 | } |
||
83 |