1 | <?php |
||
18 | class FormObjectHash |
||
19 | { |
||
20 | /** |
||
21 | * @var FormObject |
||
22 | */ |
||
23 | protected $formObject; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $hash; |
||
29 | |||
30 | /** |
||
31 | * @param FormObject $formObject |
||
32 | */ |
||
33 | public function __construct(FormObject $formObject) |
||
37 | |||
38 | /** |
||
39 | * Returns the hash of the form object, which should be calculated only once |
||
40 | * for performance concerns. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getHash() |
||
52 | |||
53 | /** |
||
54 | * Returns the calculated hash of the form object. |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | protected function calculateHash() |
||
62 | |||
63 | /** |
||
64 | * Resets the hash, which will be calculated on next access. |
||
65 | */ |
||
66 | public function resetHash() |
||
70 | } |
||
71 |