evseevnn\Cassandra\Protocol\Response\DataStream::readVarint PHP Method

readVarint() public method

Read variable length integer.
public readVarint ( boolean $isCollectionElement = false ) : string
$isCollectionElement boolean
return string
    public function readVarint($isCollectionElement = false)
    {
        if ($isCollectionElement) {
            $length = $this->readShort();
        } else {
            $length = strlen($this->data);
        }
        $hex = unpack('H*', $this->read($length));
        return $this->bchexdec($hex[1]);
    }