PhpOrient\Protocols\Binary\Serialization\CSV::eatBag PHP Method

eatBag() protected static method

Consume a record id bag.
protected static eatBag ( string $input ) : array
$input string The input to consume
return array The collected record id bag and any remaining content.
    protected static function eatBag($input)
    {
        $length = strlen($input);
        $collected = '';
        for ($i = 0; $i < $length; $i++) {
            $c = $input[$i];
            if ($c === ';') {
                break;
            } else {
                $collected .= $c;
            }
        }
        return [new Bag($collected), substr($input, $i + 1)];
    }