PhpOrient\Protocols\Binary\Abstracts\Operation::_readRecord PHP Метод

_readRecord() защищенный Метод

In case of null record then -2 as short is passed. In case of RID -3 is passes as short and then the RID: (-3:short)(cluster-id:short)(cluster-position:long). In case of record: (0:short)(record-type:byte)(cluster-id:short) (cluster-position:long)(record-version:int)(record-content:bytes)
protected _readRecord ( ) : array
Результат array
    protected function _readRecord()
    {
        $classId = $this->_readShort();
        $record = ['classId' => $classId];
        if ($classId === -1) {
            throw new SocketException('No class for record, cannot proceed!');
        } elseif ($classId === -2) {
            // null record
            $record['bytes'] = null;
        } elseif ($classId === -3) {
            // reference
            $record['type'] = 'd';
            $cluster = $this->_readShort();
            $position = $this->_readLong();
            $record['rid'] = new ID($cluster, $position);
        } else {
            $record['type'] = $this->_readChar();
            $cluster = $this->_readShort();
            $position = $this->_readLong();
            $record['version'] = $this->_readInt();
            $data = CSV::unserialize($this->_readBytes());
            $record['rid'] = new ID($cluster, $position);
            if (isset($data['oClass'])) {
                $record['oClass'] = $data['oClass'];
                unset($data['oClass']);
            }
            $record['oData'] = $data;
        }
        return $record;
    }