src/Buffer.php
public function get($limit)
    {
        if (is_int($limit)) {
            return $this->getLength($limit);
        }

        if (is_string($limit)) {
            return $this->getDelimiter($limit);
        }

        throw new \InvalidArgumentException();
    }
public function get($limit)
    {
        if (is_int($limit)) {
            return $this->getLength($limit);
        }

        if (is_string($limit)) {
            return $this->getDelimiter($limit);
        }

        throw new \InvalidArgumentException();
    }
public function get ( $ limit ) { if ( is_int ( $ limit ) ) { return $ this -> getLength ( $ limit ) ; } if ( is_string ( $ limit ) ) { return $ this -> getDelimiter ( $ limit ) ; } throw new \ InvalidArgumentException ( ) ; }
Get limited data from the beginning of the buffer.

\param int|string $limit
Either the number of bytes to retrieve
from the buffer, or a string delimiter
to look for.

\retval string
The data at the beginning of the buffer, until the given
limit is reached. For string delimiters, the delimiter
is part of the result.
Get limited data from the beginning of the buffer .