evseevnn\Cassandra\Protocol\Response\DataStream::readDecimal PHP 메소드

readDecimal() 공개 메소드

Read variable length decimal.
public readDecimal ( boolean $isCollectionElement = false ) : string
$isCollectionElement boolean
리턴 string
    public function readDecimal($isCollectionElement = false)
    {
        if ($isCollectionElement) {
            $this->readShort();
        }
        $scale = $this->readInt();
        $value = $this->readVarint($isCollectionElement);
        $len = strlen($value);
        return substr($value, 0, $len - $scale) . '.' . substr($value, $len - $scale);
    }