in src/Apache/Ignite/Data/BinaryObject.php [438:468]
private function readHeader(BinaryCommunicator $communicator): void
{
// type code
$this->buffer->readByte();
// version
$version = $this->buffer->readByte();
if ($version !== BinaryObject::VERSION) {
BinaryUtils::internalError();
}
// flags
$flags = $this->buffer->readShort();
// type id
$typeId = $this->buffer->readInteger();
// hash code
$this->buffer->readInteger();
// length
$this->length = $this->buffer->readInteger();
// schema id
$schemaId = $this->buffer->readInteger();
// schema offset
$this->schemaOffset = $this->buffer->readInteger();
$this->hasSchema = BinaryObject::isFlagSet($flags, BinaryObject::FLAG_HAS_SCHEMA);
$this->compactFooter = BinaryObject::isFlagSet($flags, BinaryObject::FLAG_COMPACT_FOOTER);
$this->hasRawData = BinaryObject::isFlagSet($flags, BinaryObject::FLAG_HAS_RAW_DATA);
$this->offsetType = BinaryObject::isFlagSet($flags, BinaryObject::FLAG_OFFSET_ONE_BYTE) ?
ObjectType::BYTE :
(BinaryObject::isFlagSet($flags, BinaryObject::FLAG_OFFSET_TWO_BYTES) ?
ObjectType::SHORT :
ObjectType::INTEGER);
$this->typeBuilder = BinaryTypeBuilder::fromTypeId($communicator, $typeId, $this->compactFooter ? $schemaId : null);
}