1 | <?php |
||
16 | abstract class ComponentMetadata |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $className; |
||
22 | |||
23 | /** |
||
24 | * @var ComponentMetadata|null |
||
25 | */ |
||
26 | protected $parent; |
||
27 | |||
28 | /** |
||
29 | * The ReflectionClass instance of the component class. |
||
30 | * |
||
31 | * @var \ReflectionClass|null |
||
32 | */ |
||
33 | protected $reflectionClass; |
||
34 | |||
35 | /** |
||
36 | * @var CacheMetadata|null |
||
37 | */ |
||
38 | protected $cache; |
||
39 | |||
40 | /** |
||
41 | * @var array<string, Property> |
||
42 | */ |
||
43 | protected $declaredProperties = []; |
||
44 | |||
45 | /** |
||
46 | * ComponentMetadata constructor. |
||
47 | * |
||
48 | * @param string $className |
||
49 | */ |
||
50 | public function __construct(string $className) |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getClassName() : string |
||
62 | |||
63 | /** |
||
64 | * @param ComponentMetadata $parent |
||
65 | */ |
||
66 | public function setParent(ComponentMetadata $parent) : void |
||
70 | |||
71 | /** |
||
72 | * @return ComponentMetadata|null |
||
73 | */ |
||
74 | public function getParent() : ?ComponentMetadata |
||
78 | |||
79 | /** |
||
80 | * @return \ReflectionClass|null |
||
81 | */ |
||
82 | public function getReflectionClass() : ?\ReflectionClass |
||
86 | |||
87 | /** |
||
88 | * @param CacheMetadata|null $cache |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | public function setCache(?CacheMetadata $cache = null) : void |
||
96 | |||
97 | /** |
||
98 | * @return CacheMetadata|null |
||
99 | */ |
||
100 | public function getCache(): ?CacheMetadata |
||
104 | |||
105 | /** |
||
106 | * @return \ArrayIterator |
||
107 | */ |
||
108 | public function getDeclaredPropertiesIterator() : \ArrayIterator |
||
112 | |||
113 | /** |
||
114 | * @param Property $property |
||
115 | * |
||
116 | * @throws MappingException |
||
117 | */ |
||
118 | public function addDeclaredProperty(Property $property) : void |
||
135 | |||
136 | /** |
||
137 | * @param string $propertyName |
||
138 | * |
||
139 | * @return bool |
||
140 | */ |
||
141 | public function hasDeclaredProperty(string $propertyName) : bool |
||
145 | |||
146 | /** |
||
147 | * @return \Iterator |
||
148 | */ |
||
149 | public function getPropertiesIterator() : \Iterator |
||
164 | |||
165 | /** |
||
166 | * @param string $propertyName |
||
167 | * |
||
168 | * @return null|Property |
||
169 | */ |
||
170 | public function getProperty(string $propertyName) : ?Property |
||
182 | |||
183 | /** |
||
184 | * @param string $propertyName |
||
185 | * |
||
186 | * @return bool |
||
187 | */ |
||
188 | public function hasProperty(string $propertyName) : bool |
||
196 | |||
197 | /** |
||
198 | * @return \ArrayIterator |
||
199 | */ |
||
200 | public function getColumnsIterator() : \ArrayIterator |
||
223 | |||
224 | /** |
||
225 | * @param string|null $className |
||
226 | * |
||
227 | * @return string|null null if the input value is null |
||
228 | */ |
||
229 | public function fullyQualifiedClassName(?string $className) : ?string |
||
243 | } |
||
244 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: