in src/Apache/Ignite/Internal/Binary/BinaryTypeBuilder.php [186:206]
private function setFields(ComplexObjectType $complexObjectType, object $object): void
{
try {
$reflect = new \ReflectionClass($object);
$properties = $reflect->getProperties(\ReflectionProperty::IS_PUBLIC);
foreach ($properties as $property) {
if ($property->isStatic()) {
continue;
}
$fieldName = $property->getName();
$fieldType = $complexObjectType->getFieldType($fieldName);
if (!$fieldType) {
$fieldValue = $property->getValue($object);
$fieldType = BinaryUtils::calcObjectType($fieldValue);
}
$this->setField($fieldName, BinaryUtils::getTypeCode($fieldType));
}
} catch (\ReflectionException $e) {
BinaryUtils::serializationError(true, sprintf('class "%s" does not exist', get_class($object)));
}
}