public function writeValue()

in src/Apache/Ignite/Internal/Binary/BinaryObjectField.php [80:96]


    public function writeValue(BinaryCommunicator $communicator, MessageBuffer $buffer, int $expectedTypeCode): void
    {
        $offset = $buffer->getPosition();
        if ($this->buffer && $this->communicator === $communicator) {
            $buffer->writeBuffer($this->buffer, $this->offset, $this->length);
        } else {
            if (!$this->value) {
                $this->getValue($expectedTypeCode);
            }
            BinaryUtils::checkCompatibility($this->value, $expectedTypeCode);
            $communicator->writeObject($buffer, $this->value, $this->type);
        }
        $this->communicator = $communicator;
        $this->buffer = $buffer;
        $this->length = $buffer->getPosition() - $offset;
        $this->offset = $offset;
    }