Beispiel #1
0
 /**
  * Create stream reader object
  *
  * @param StreamInterface $stream The stream to read from
  *
  * @throws Exception\InvalidArgumentException An exception will be thrown when the provided stream is not readable
  */
 public function __construct(StreamInterface $stream)
 {
     if (!$stream->isReadable()) {
         throw new Exception\InvalidArgumentException('Stream is not readable');
     }
     $this->stream = $stream;
 }