Lines Matching refs:this

54             $this->size = $options['size'];
57 $this->customMetadata = isset($options['metadata'])
61 $this->stream = $stream;
62 $meta = stream_get_meta_data($this->stream);
63 $this->seekable = $meta['seekable'];
64 $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
65 $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
66 $this->uri = $this->getMetadata('uri');
74 $this->close();
80 if ($this->isSeekable()) {
81 $this->seek(0);
83 return $this->getContents();
91 if (!isset($this->stream)) {
95 $contents = stream_get_contents($this->stream);
106 if (isset($this->stream)) {
107 if (is_resource($this->stream)) {
108 fclose($this->stream);
110 $this->detach();
116 if (!isset($this->stream)) {
120 $result = $this->stream;
121 unset($this->stream);
122 $this->size = $this->uri = null;
123 $this->readable = $this->writable = $this->seekable = false;
130 if ($this->size !== null) {
131 return $this->size;
134 if (!isset($this->stream)) {
139 if ($this->uri) {
140 clearstatcache(true, $this->uri);
143 $stats = fstat($this->stream);
145 $this->size = $stats['size'];
146 return $this->size;
154 return $this->readable;
159 return $this->writable;
164 return $this->seekable;
169 if (!isset($this->stream)) {
173 return feof($this->stream);
178 if (!isset($this->stream)) {
182 $result = ftell($this->stream);
193 $this->seek(0);
200 if (!isset($this->stream)) {
203 if (!$this->seekable) {
206 if (fseek($this->stream, $offset, $whence) === -1) {
214 if (!isset($this->stream)) {
217 if (!$this->readable) {
228 $string = fread($this->stream, $length);
238 if (!isset($this->stream)) {
241 if (!$this->writable) {
246 $this->size = null;
247 $result = fwrite($this->stream, $string);
258 if (!isset($this->stream)) {
261 return $this->customMetadata + stream_get_meta_data($this->stream);
262 } elseif (isset($this->customMetadata[$key])) {
263 return $this->customMetadata[$key];
266 $meta = stream_get_meta_data($this->stream);