public function read($length) : string
	{
		if (! \is_resource($this->resource))
		{
			throw new Exception\UnreadableStreamException('Stream is not resourceable');
		}

		if (! $this->isReadable())
		{
			throw new Exception\UnreadableStreamException('Stream is not readable');
		}

		$result = \fread($this->resource, $length);

		if (false === $result)
		{
			throw new Exception\UnreadableStreamException('Unable to read from the stream');
		}

		return $result;
	}
public function read($length) : string
	{
		if (! \is_resource($this->resource))
		{
			throw new Exception\UnreadableStreamException('Stream is not resourceable');
		}

		if (! $this->isReadable())
		{
			throw new Exception\UnreadableStreamException('Stream is not readable');
		}

		$result = \fread($this->resource, $length);

		if (false === $result)
		{
			throw new Exception\UnreadableStreamException('Unable to read from the stream');
		}

		return $result;
	}
public function read ( $ length ) : string { if ( ! \ is_resource ( $ this -> resource ) ) { throw new Exception \ UnreadableStreamException ( 'Stream is not resourceable' ) ; } if ( ! $ this -> isReadable ( ) ) { throw new Exception \ UnreadableStreamException ( 'Stream is not readable' ) ; } $ result = \ fread ( $ this -> resource , $ length ) ; if ( false === $ result ) { throw new Exception \ UnreadableStreamException ( 'Unable to read from the stream' ) ; } return $ result ; }
Reads the given number of bytes from the stream

@param int $length

@return string

@throws Exception\UnreadableStreamException

@link http://php.net/manual/en/function.fread.php
Reads the given number of bytes from the stream