コード例 #1
0
ファイル: AppendStream.php プロジェクト: hexcode007/yfcms
 /**
  * Add a stream to the AppendStream
  *
  * @param StreamInterface $stream Stream to append. Must be readable.
  *
  * @throws \InvalidArgumentException if the stream is not readable
  */
 public function addStream(StreamInterface $stream)
 {
     if (!$stream->isReadable()) {
         throw new \InvalidArgumentException('Each stream must be readable');
     }
     // The stream is only seekable if all streams are seekable
     if (!$stream->isSeekable()) {
         $this->seekable = false;
     }
     $this->streams[] = $stream;
 }
コード例 #2
0
ファイル: GuzzleHttpStream.php プロジェクト: lamenath/fbp
 /**
  * {@inheritdoc}
  */
 protected function doIsReadable()
 {
     return $this->stream->isReadable();
 }