1 | <?php |
||
22 | class FormObjectStatic |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $className; |
||
28 | |||
29 | /** |
||
30 | * The properties of the form. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $properties = []; |
||
35 | |||
36 | /** |
||
37 | * @var FormObjectConfiguration |
||
38 | */ |
||
39 | protected $configuration; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $objectHash; |
||
45 | |||
46 | /** |
||
47 | * @param string $className |
||
48 | * @param array $formConfiguration |
||
49 | */ |
||
50 | public function __construct($className, array $formConfiguration) |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getClassName() |
||
63 | |||
64 | /** |
||
65 | * @return array |
||
66 | */ |
||
67 | public function getProperties() |
||
71 | |||
72 | /** |
||
73 | * @param string $name |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function hasProperty($name) |
||
80 | |||
81 | /** |
||
82 | * Registers a new property for this form. |
||
83 | * |
||
84 | * @param string $name |
||
85 | * @return $this |
||
86 | */ |
||
87 | public function addProperty($name) |
||
96 | |||
97 | /** |
||
98 | * @return Form |
||
99 | */ |
||
100 | public function getConfiguration() |
||
107 | |||
108 | /** |
||
109 | * This function will merge and return the validation results of both the |
||
110 | * global FormZ configuration object, and this form configuration object. |
||
111 | * |
||
112 | * @return Result |
||
113 | */ |
||
114 | public function getConfigurationValidationResult() |
||
118 | |||
119 | /** |
||
120 | * Returns the hash of the form object, which should be calculated only once |
||
121 | * for performance concerns. |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public function getObjectHash() |
||
133 | |||
134 | /** |
||
135 | * Returns the calculated hash of the form object. |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | protected function calculateObjectHash() |
||
143 | } |
||
144 |