Lines Matching refs:stream
51 * @param StreamInterface $stream Stream to read
56 public static function copyToString(StreamInterface $stream, $maxLen = -1) argument
61 while (!$stream->eof()) {
62 $buf = $stream->read(1048576);
72 while (!$stream->eof() && $len < $maxLen) {
73 $buf = $stream->read($maxLen - $len);
124 * @param StreamInterface $stream Stream to calculate the hash for
132 StreamInterface $stream, argument
136 $pos = $stream->tell();
138 if ($pos > 0 && !$stream->seek(0)) {
139 throw new SeekException($stream);
143 while (!$stream->eof()) {
144 hash_update($ctx, $stream->read(1048576));
148 $stream->seek($pos);
156 * @param StreamInterface $stream Stream to read from
162 public static function readline(StreamInterface $stream, $maxLength = null, $eol = PHP_EOL) argument
168 while (!$stream->eof()) {
169 if (false === ($byte = $stream->read(1))) {