evseevnn\Cassandra\Protocol\BinaryData::getVarInt PHP Method

getVarInt() private method

private getVarInt ( ) : string
return string
    private function getVarInt()
    {
        if (!(double) $this->value && !(int) $this->value) {
            trigger_error('VarInt value ' . $this->value . ' not an int or float', E_USER_ERROR);
        }
        $hex = $this->bcdechex($this->value);
        if (strlen($hex) % 2 != 0) {
            $hex = '0' . $hex;
        }
        return pack('H*', $hex);
    }