opensrs\Base::read_data PHP Method

read_data() private method

Method to read data from the buffer stream.
Since: 3.1
private read_data ( ) : string
return string XML response
    private function read_data()
    {
        $buf = $this->readData($this->_socket, $this->_socketReadTimeout);
        if (!$buf) {
            throw new Exception('oSRS Error - Read buffer is empty.  Please make sure IP is whitelisted in RWI. Check the OSRS_KEY and OSRS_USERNAME in the config file as well.');
            $data = '';
        } else {
            $data = $buf;
        }
        if (!empty($this->osrs_debug)) {
            print_r('<pre>' . htmlentities($data) . '</pre>');
        }
        return $data;
    }