1 | <?php |
||
22 | class FormObjectProperties |
||
23 | { |
||
24 | const IGNORE_PROPERTY = 'formz-ignore'; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private static $ignoredProperties = ['validationData', 'uid', 'pid', '_localizedUid', '_languageUid', '_versionedUid']; |
||
30 | |||
31 | /** |
||
32 | * @var FormObjectStatic |
||
33 | */ |
||
34 | protected $static; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $properties; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $publicProperties; |
||
45 | |||
46 | /** |
||
47 | * @var ReflectionService |
||
48 | */ |
||
49 | protected $reflectionService; |
||
50 | |||
51 | /** |
||
52 | * @param FormObjectStatic $static |
||
53 | */ |
||
54 | public function __construct(FormObjectStatic $static) |
||
59 | |||
60 | /** |
||
61 | * Returns all the accessible properties of the form class: the public |
||
62 | * properties and the ones that can be accessed with a getter method. |
||
63 | * |
||
64 | * If a class property must be excluded from this list, the following tag |
||
65 | * must be added to the property: `@formz-ignore`. |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getProperties() |
||
87 | |||
88 | /** |
||
89 | * @param string $propertyName |
||
90 | * @return bool |
||
91 | */ |
||
92 | protected function propertyShouldBeAdded($propertyName) |
||
98 | |||
99 | /** |
||
100 | * @param string $propertyName |
||
101 | * @return bool |
||
102 | */ |
||
103 | protected function propertyCanBeAccessed($propertyName) |
||
126 | |||
127 | /** |
||
128 | * @return array |
||
129 | */ |
||
130 | protected function getPublicProperties() |
||
146 | |||
147 | /** |
||
148 | * @return array |
||
149 | */ |
||
150 | public function __sleep() |
||
154 | |||
155 | /** |
||
156 | * Injects dependencies. |
||
157 | */ |
||
158 | public function __wakeup() |
||
162 | } |
||
163 |