Lines Matching refs:stream
9 private $stream; variable in GuzzleHttp\\Stream\\Stream
50 $stream = fopen('php://temp', 'r+');
52 fwrite($stream, $resource);
53 fseek($stream, 0);
55 return new self($stream, $options);
97 * @param resource $stream Stream resource to wrap.
102 public function __construct($stream, $options = []) argument
104 if (!is_resource($stream)) {
116 $this->attach($stream);
129 if (!$this->stream) {
135 return (string) stream_get_contents($this->stream);
140 return $this->stream ? stream_get_contents($this->stream) : '';
145 if (is_resource($this->stream)) {
146 fclose($this->stream);
154 $result = $this->stream;
155 $this->stream = $this->size = $this->uri = null;
161 public function attach($stream) argument
163 $this->stream = $stream;
164 $meta = stream_get_meta_data($this->stream);
177 if (!$this->stream) {
186 $stats = fstat($this->stream);
212 return !$this->stream || feof($this->stream);
217 return $this->stream ? ftell($this->stream) : false;
230 ? fseek($this->stream, $offset, $whence) === 0
236 return $this->readable ? fread($this->stream, $length) : false;
244 return $this->writable ? fwrite($this->stream, $string) : false;
249 if (!$this->stream) {
252 return $this->customMetadata + stream_get_meta_data($this->stream);
257 $meta = stream_get_meta_data($this->stream);