1 | <?php |
||
21 | class FormObjectRequestData |
||
22 | { |
||
23 | /** |
||
24 | * @var HashService |
||
25 | */ |
||
26 | protected $hashService; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $data = []; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $formHash; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $contentObjectTable; |
||
42 | |||
43 | /** |
||
44 | * @var int |
||
45 | */ |
||
46 | protected $contentObjectUid; |
||
47 | |||
48 | /** |
||
49 | * The given argument must be a string, hashed with the hash service, and |
||
50 | * must contain an instance of this class. The data will be fetched from the |
||
51 | * instance, and injected in the actual class. |
||
52 | * |
||
53 | * @param string $hash |
||
54 | */ |
||
55 | public function fillFromHash($hash) |
||
80 | |||
81 | /** |
||
82 | * @param string $key |
||
83 | * @param mixed $value |
||
84 | */ |
||
85 | public function addData($key, $value) |
||
89 | |||
90 | /** |
||
91 | * @return array |
||
92 | */ |
||
93 | public function getData() |
||
97 | |||
98 | /** |
||
99 | * @param string $key |
||
100 | * @return bool |
||
101 | */ |
||
102 | public function hasData($key) |
||
106 | |||
107 | /** |
||
108 | * @param string $key |
||
109 | * @return mixed |
||
110 | * @throws EntryNotFoundException |
||
111 | */ |
||
112 | public function getDataValue($key) |
||
120 | |||
121 | /** |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getFormHash() |
||
128 | |||
129 | /** |
||
130 | * @param string $formHash |
||
131 | */ |
||
132 | public function setFormHash($formHash) |
||
136 | |||
137 | /** |
||
138 | * @return string |
||
139 | */ |
||
140 | public function getContentObjectTable() |
||
144 | |||
145 | /** |
||
146 | * @param string $contentObjectTable |
||
147 | */ |
||
148 | public function setContentObjectTable($contentObjectTable) |
||
152 | |||
153 | /** |
||
154 | * @return int |
||
155 | */ |
||
156 | public function getContentObjectUid() |
||
160 | |||
161 | /** |
||
162 | * @param int $contentObjectUid |
||
163 | */ |
||
164 | public function setContentObjectUid($contentObjectUid) |
||
168 | |||
169 | /** |
||
170 | * @param HashService $hashService |
||
171 | */ |
||
172 | public function injectHashService(HashService $hashService) |
||
176 | |||
177 | /** |
||
178 | * @return array |
||
179 | */ |
||
180 | public function toArray() |
||
193 | |||
194 | /** |
||
195 | * @throws InvalidArgumentValueException |
||
196 | */ |
||
197 | protected function throwFormDataException() |
||
201 | } |
||
202 |