PhpOrient\Protocols\Binary\Abstracts\Operation::_readString PHP Method

_readString() protected method

Read a string from the socket.
protected _readString ( ) : string | null
return string | null the string read, or null if it's empty.
    protected function _readString()
    {
        $length = $this->_readInt();
        if ($length === -1) {
            return null;
        } else {
            if ($length === 0) {
                return '';
            } else {
                $this->_input_buffer .= $string = $this->_socket->read($length);
                return $string;
            }
        }
    }