308 $collectionPostfix =
'Collection';
309 $collectionPostfixLength = mb_strlen($collectionPostfix);
310 $parentCollection =
"parent{$collectionPostfix}";
312 foreach ((
new \ReflectionObject($this))->getProperties() as $property)
314 $propertyName = $property->getName();
317 $propertyName !== $parentCollection
318 && mb_substr($propertyName, -$collectionPostfixLength) === $collectionPostfix
321 $property->setAccessible(
true);
322 $value = $property->getValue($this);
324 if ($value ===
null && $initCollections)
326 $propertyGetter =
"get{$propertyName}";
328 if (is_callable([$this, $propertyGetter]))
330 $value = $this->$propertyGetter();