1 | <?php |
||
25 | class FormObjectStatic |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $className; |
||
31 | |||
32 | /** |
||
33 | * The properties of the form. |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $properties = []; |
||
38 | |||
39 | /** |
||
40 | * @var FormObjectConfiguration |
||
41 | */ |
||
42 | protected $configuration; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $objectHash; |
||
48 | |||
49 | /** |
||
50 | * @param string $className |
||
51 | * @param array $formConfiguration |
||
52 | */ |
||
53 | public function __construct($className, array $formConfiguration) |
||
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getClassName() |
||
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | public function getProperties() |
||
74 | |||
75 | /** |
||
76 | * @param string $name |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function hasProperty($name) |
||
83 | |||
84 | /** |
||
85 | * Registers a new property for this form. |
||
86 | * |
||
87 | * @param string $name |
||
88 | * @return $this |
||
89 | */ |
||
90 | public function addProperty($name) |
||
99 | |||
100 | /** |
||
101 | * @return Form |
||
102 | */ |
||
103 | public function getConfiguration() |
||
110 | |||
111 | /** |
||
112 | * This function will merge and return the validation results of both the |
||
113 | * global FormZ configuration object, and this form configuration object. |
||
114 | * |
||
115 | * @return Result |
||
116 | */ |
||
117 | public function getConfigurationValidationResult() |
||
121 | |||
122 | /** |
||
123 | * Returns the hash of the form object, which should be calculated only once |
||
124 | * for performance concerns. |
||
125 | * |
||
126 | * @return string |
||
127 | */ |
||
128 | public function getObjectHash() |
||
136 | |||
137 | /** |
||
138 | * Returns the calculated hash of the form object. |
||
139 | * |
||
140 | * @return string |
||
141 | */ |
||
142 | protected function calculateObjectHash() |
||
146 | } |
||
147 |