287 $collectionPostfix =
'Collection';
288 $collectionPostfixLength = mb_strlen($collectionPostfix);
289 $parentCollection =
"parent{$collectionPostfix}";
291 foreach ((
new \ReflectionObject($this))->getProperties() as $property)
293 $propertyName = $property->getName();
296 $propertyName !== $parentCollection
297 && mb_substr($propertyName, -$collectionPostfixLength) === $collectionPostfix
300 $property->setAccessible(
true);
301 $value = $property->getValue($this);
303 if ($value ===
null && $initCollections)
305 $propertyGetter =
"get{$propertyName}";
307 if (is_callable([$this, $propertyGetter]))
309 $value = $this->$propertyGetter();