1 | <?php |
||
18 | class FormObjectRequestData |
||
19 | { |
||
20 | /** |
||
21 | * @var HashService |
||
22 | */ |
||
23 | protected $hashService; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $data = []; |
||
29 | |||
30 | /** |
||
31 | * The given argument must be a string, hashed with the hash service, and |
||
32 | * must contain an instance of this class. The data will be fetched from the |
||
33 | * instance, and injected in the actual class. |
||
34 | * |
||
35 | * @param string $hash |
||
36 | */ |
||
37 | public function fillFromHash($hash) |
||
47 | |||
48 | /** |
||
49 | * @param string $key |
||
50 | * @param mixed $value |
||
51 | */ |
||
52 | public function addData($key, $value) |
||
56 | |||
57 | /** |
||
58 | * @return array |
||
59 | */ |
||
60 | public function getData() |
||
64 | |||
65 | /** |
||
66 | * @param string $key |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function hasData($key) |
||
73 | |||
74 | /** |
||
75 | * @param string $key |
||
76 | * @return mixed |
||
77 | */ |
||
78 | public function getDataValue($key) |
||
86 | |||
87 | /** |
||
88 | * @param HashService $hashService |
||
89 | */ |
||
90 | public function injectHashService(HashService $hashService) |
||
94 | |||
95 | /** |
||
96 | * @return array |
||
97 | */ |
||
98 | public function toArray() |
||
111 | } |
||
112 |