@@ -14,12 +14,12 @@ decorators.
14
14
15
15
## AppendStream
16
16
17
- ` GuzzleHttp \Psr7\AppendStream`
17
+ ` RingCentral \Psr7\AppendStream`
18
18
19
19
Reads from multiple streams, one after the other.
20
20
21
21
``` php
22
- use GuzzleHttp \Psr7;
22
+ use RingCentral \Psr7;
23
23
24
24
$a = Psr7\stream_for('abc, ');
25
25
$b = Psr7\stream_for('123.');
@@ -33,7 +33,7 @@ echo $composed(); // abc, 123. Above all listen to me.
33
33
34
34
## BufferStream
35
35
36
- ` GuzzleHttp \Psr7\BufferStream`
36
+ ` RingCentral \Psr7\BufferStream`
37
37
38
38
Provides a buffer stream that can be written to to fill a buffer, and read
39
39
from to remove bytes from the buffer.
@@ -43,7 +43,7 @@ what the configured high water mark of the stream is, or the maximum
43
43
preferred size of the buffer.
44
44
45
45
``` php
46
- use GuzzleHttp \Psr7;
46
+ use RingCentral \Psr7;
47
47
48
48
// When more than 1024 bytes are in the buffer, it will begin returning
49
49
// false to writes. This is an indication that writers should slow down.
@@ -61,7 +61,7 @@ a PHP temp stream so that previously read bytes are cached first in memory,
61
61
then on disk.
62
62
63
63
``` php
64
- use GuzzleHttp \Psr7;
64
+ use RingCentral \Psr7;
65
65
66
66
$original = Psr7\stream_for(fopen('http://www.google.com', 'r'));
67
67
$stream = new Psr7\CachingStream($original);
@@ -78,13 +78,13 @@ echo $stream->tell();
78
78
79
79
## DroppingStream
80
80
81
- ` GuzzleHttp \Psr7\DroppingStream`
81
+ ` RingCentral \Psr7\DroppingStream`
82
82
83
83
Stream decorator that begins dropping data once the size of the underlying
84
84
stream becomes too full.
85
85
86
86
``` php
87
- use GuzzleHttp \Psr7;
87
+ use RingCentral \Psr7;
88
88
89
89
// Create an empty stream
90
90
$stream = Psr7\stream_for();
@@ -99,7 +99,7 @@ echo $stream; // 0123456789
99
99
100
100
## FnStream
101
101
102
- ` GuzzleHttp \Psr7\FnStream`
102
+ ` RingCentral \Psr7\FnStream`
103
103
104
104
Compose stream implementations based on a hash of functions.
105
105
@@ -108,7 +108,7 @@ to create a concrete class for a simple extension point.
108
108
109
109
``` php
110
110
111
- use GuzzleHttp \Psr7;
111
+ use RingCentral \Psr7;
112
112
113
113
$stream = Psr7\stream_for('hi');
114
114
$fnStream = Psr7\FnStream::decorate($stream, [
@@ -126,7 +126,7 @@ $fnStream->rewind();
126
126
127
127
## InflateStream
128
128
129
- ` GuzzleHttp \Psr7\InflateStream`
129
+ ` RingCentral \Psr7\InflateStream`
130
130
131
131
Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
132
132
@@ -138,13 +138,13 @@ to a Guzzle stream resource to be used as a Guzzle stream.
138
138
139
139
## LazyOpenStream
140
140
141
- ` GuzzleHttp \Psr7\LazyOpenStream`
141
+ ` RingCentral \Psr7\LazyOpenStream`
142
142
143
143
Lazily reads or writes to a file that is opened only after an IO operation
144
144
take place on the stream.
145
145
146
146
``` php
147
- use GuzzleHttp \Psr7;
147
+ use RingCentral \Psr7;
148
148
149
149
$stream = new Psr7\LazyOpenStream('/path/to/file', 'r');
150
150
// The file has not yet been opened...
@@ -156,14 +156,14 @@ echo $stream->read(10);
156
156
157
157
## LimitStream
158
158
159
- ` GuzzleHttp \Psr7\LimitStream`
159
+ ` RingCentral \Psr7\LimitStream`
160
160
161
161
LimitStream can be used to read a subset or slice of an existing stream object.
162
162
This can be useful for breaking a large file into smaller pieces to be sent in
163
163
chunks (e.g. Amazon S3's multipart upload API).
164
164
165
165
``` php
166
- use GuzzleHttp \Psr7;
166
+ use RingCentral \Psr7;
167
167
168
168
$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+'));
169
169
echo $original->getSize();
@@ -180,20 +180,20 @@ echo $stream->tell();
180
180
181
181
## MultipartStream
182
182
183
- ` GuzzleHttp \Psr7\MultipartStream`
183
+ ` RingCentral \Psr7\MultipartStream`
184
184
185
185
Stream that when read returns bytes for a streaming multipart or
186
186
multipart/form-data stream.
187
187
188
188
189
189
## NoSeekStream
190
190
191
- ` GuzzleHttp \Psr7\NoSeekStream`
191
+ ` RingCentral \Psr7\NoSeekStream`
192
192
193
193
NoSeekStream wraps a stream and does not allow seeking.
194
194
195
195
``` php
196
- use GuzzleHttp \Psr7;
196
+ use RingCentral \Psr7;
197
197
198
198
$original = Psr7\stream_for('foo');
199
199
$noSeek = new Psr7\NoSeekStream($original);
@@ -210,7 +210,7 @@ var_export($noSeek->read(3));
210
210
211
211
## PumpStream
212
212
213
- ` GuzzleHttp \Psr7\PumpStream`
213
+ ` RingCentral \Psr7\PumpStream`
214
214
215
215
Provides a read only stream that pumps data from a PHP callable.
216
216
@@ -225,7 +225,7 @@ false when there is no more data to read.
225
225
## Implementing stream decorators
226
226
227
227
Creating a stream decorator is very easy thanks to the
228
- ` GuzzleHttp \Psr7\StreamDecoratorTrait` . This trait provides methods that
228
+ ` RingCentral \Psr7\StreamDecoratorTrait` . This trait provides methods that
229
229
implement ` Psr\Http\Message\StreamInterface ` by proxying to an underlying
230
230
stream. Just ` use ` the ` StreamDecoratorTrait ` and implement your custom
231
231
methods.
@@ -236,7 +236,7 @@ byte is read from a stream. This could be implemented by overriding the
236
236
237
237
``` php
238
238
use Psr\Http\Message\StreamInterface;
239
- use GuzzleHttp \Psr7\StreamDecoratorTrait;
239
+ use RingCentral \Psr7\StreamDecoratorTrait;
240
240
241
241
class EofCallbackStream implements StreamInterface
242
242
{
@@ -267,7 +267,7 @@ class EofCallbackStream implements StreamInterface
267
267
This decorator could be added to any existing stream and used like so:
268
268
269
269
``` php
270
- use GuzzleHttp \Psr7;
270
+ use RingCentral \Psr7;
271
271
272
272
$original = Psr7\stream_for('foo');
273
273
@@ -286,24 +286,24 @@ $eofStream->read(3);
286
286
287
287
## PHP StreamWrapper
288
288
289
- You can use the ` GuzzleHttp \Psr7\StreamWrapper` class if you need to use a
289
+ You can use the ` RingCentral \Psr7\StreamWrapper` class if you need to use a
290
290
PSR-7 stream as a PHP stream resource.
291
291
292
- Use the ` GuzzleHttp \Psr7\StreamWrapper::getResource()` method to create a PHP
292
+ Use the ` RingCentral \Psr7\StreamWrapper::getResource()` method to create a PHP
293
293
stream from a PSR-7 stream.
294
294
295
295
``` php
296
- use GuzzleHttp \Psr7\StreamWrapper;
296
+ use RingCentral \Psr7\StreamWrapper;
297
297
298
- $stream = GuzzleHttp \Psr7\stream_for('hello!');
298
+ $stream = RingCentral \Psr7\stream_for('hello!');
299
299
$resource = StreamWrapper::getResource($stream);
300
300
echo fread($resource, 6); // outputs hello!
301
301
```
302
302
303
303
304
304
# Function API
305
305
306
- There are various functions available under the ` GuzzleHttp \Psr7` namespace.
306
+ There are various functions available under the ` RingCentral \Psr7` namespace.
307
307
308
308
309
309
## ` function str `
@@ -313,8 +313,8 @@ There are various functions available under the `GuzzleHttp\Psr7` namespace.
313
313
Returns the string representation of an HTTP message.
314
314
315
315
``` php
316
- $request = new GuzzleHttp \Psr7\Request('GET', 'http://example.com');
317
- echo GuzzleHttp \Psr7\str($request);
316
+ $request = new RingCentral \Psr7\Request('GET', 'http://example.com');
317
+ echo RingCentral \Psr7\str($request);
318
318
```
319
319
320
320
@@ -327,8 +327,8 @@ UriInterface for the given value. If the value is already a `UriInterface`, it
327
327
is returned as-is.
328
328
329
329
``` php
330
- $uri = GuzzleHttp \Psr7\uri_for('http://example.com');
331
- assert($uri === GuzzleHttp \Psr7\uri_for($uri));
330
+ $uri = RingCentral \Psr7\uri_for('http://example.com');
331
+ assert($uri === RingCentral \Psr7\uri_for($uri));
332
332
```
333
333
334
334
@@ -367,16 +367,16 @@ This method accepts the following `$resource` types:
367
367
buffered and used in subsequent reads.
368
368
369
369
``` php
370
- $stream = GuzzleHttp \Psr7\stream_for('foo');
371
- $stream = GuzzleHttp \Psr7\stream_for(fopen('/path/to/file', 'r'));
370
+ $stream = RingCentral \Psr7\stream_for('foo');
371
+ $stream = RingCentral \Psr7\stream_for(fopen('/path/to/file', 'r'));
372
372
373
373
$generator function ($bytes) {
374
374
for ($i = 0; $i < $bytes; $i++) {
375
375
yield ' ';
376
376
}
377
377
}
378
378
379
- $stream = GuzzleHttp \Psr7\stream_for($generator(100));
379
+ $stream = RingCentral \Psr7\stream_for($generator(100));
380
380
```
381
381
382
382
@@ -519,10 +519,10 @@ Maps a file extensions to a mimetype.
519
519
520
520
# Static URI methods
521
521
522
- The ` GuzzleHttp \Psr7\Uri` class has several static methods to manipulate URIs.
522
+ The ` RingCentral \Psr7\Uri` class has several static methods to manipulate URIs.
523
523
524
524
525
- ## ` GuzzleHttp \Psr7\Uri::removeDotSegments`
525
+ ## ` RingCentral \Psr7\Uri::removeDotSegments`
526
526
527
527
` public static function removeDotSegments($path) -> UriInterface `
528
528
@@ -531,7 +531,7 @@ Removes dot segments from a path and returns the new path.
531
531
See http://tools.ietf.org/html/rfc3986#section-5.2.4
532
532
533
533
534
- ## ` GuzzleHttp \Psr7\Uri::resolve`
534
+ ## ` RingCentral \Psr7\Uri::resolve`
535
535
536
536
` public static function resolve(UriInterface $base, $rel) -> UriInterface `
537
537
@@ -540,7 +540,7 @@ Resolve a base URI with a relative URI and return a new URI.
540
540
See http://tools.ietf.org/html/rfc3986#section-5
541
541
542
542
543
- ## ` GuzzleHttp \Psr7\Uri::withQueryValue`
543
+ ## ` RingCentral \Psr7\Uri::withQueryValue`
544
544
545
545
` public static function withQueryValue(UriInterface $uri, $key, $value) -> UriInterface `
546
546
@@ -552,7 +552,7 @@ removed and replaced with the given key value pair.
552
552
Note: this function will convert "=" to "%3D" and "&" to "%26".
553
553
554
554
555
- ## ` GuzzleHttp \Psr7\Uri::withoutQueryValue`
555
+ ## ` RingCentral \Psr7\Uri::withoutQueryValue`
556
556
557
557
` public static function withoutQueryValue(UriInterface $uri, $key, $value) -> UriInterface `
558
558
@@ -564,11 +564,11 @@ removed.
564
564
Note: this function will convert "=" to "%3D" and "&" to "%26".
565
565
566
566
567
- ## ` GuzzleHttp \Psr7\Uri::fromParts`
567
+ ## ` RingCentral \Psr7\Uri::fromParts`
568
568
569
569
` public static function fromParts(array $parts) -> UriInterface `
570
570
571
- Create a ` GuzzleHttp \Psr7\Uri` object from a hash of ` parse_url ` parts.
571
+ Create a ` RingCentral \Psr7\Uri` object from a hash of ` parse_url ` parts.
572
572
573
573
574
574
# Not Implemented
0 commit comments