We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecaff24 commit 1843dfbCopy full SHA for 1843dfb
README.md
@@ -29,4 +29,16 @@ $request = (new RequestFactory)->createServerRequestFromServer();
29
$request = (new ResponseFactory)->createResponse(200);
30
```
31
32
-###
+### Stream
33
+```php
34
+// create stream from string
35
+$stream = (new StreamFactory)->createStream('Hello World!');
36
+echo $stream; // Hello World!
37
+
38
+// create stream from file
39
+$stream = (new StreamFactory)->createStreamFromFile('/path/file', 'r');
40
41
+// create stream from resource
42
+$resource = fopen('php://temp', 'r+');
43
+$stream = (new StreamFactory)->createStreamFromResource($resource);
44
+```
0 commit comments