File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,18 @@ $stream->close();
56
56
57
57
The following streams are available by default:
58
58
59
+ ### CliStream
60
+
61
+ Can be used to open up CLI ` stdin ` , ` stdout ` and ` stderr ` streams.
62
+
63
+ ``` php
64
+ use Phpro\ResourceStream\Factory\CliStream;
65
+
66
+ $stdin = CliStream::stdin();
67
+ $stdout = CliStream::stdout();
68
+ $stderr = CliStream::stderr();
69
+ ```
70
+
59
71
### FileStream
60
72
61
73
Validates if the local file exists and opens it up for you to use.
@@ -66,6 +78,17 @@ use Phpro\ResourceStream\Factory\FileStream;
66
78
$stream = FileStream::create('/path/to/file', FileStream::READ_WRITE_MODE);
67
79
```
68
80
81
+ ### IOStream
82
+
83
+ Can be used to open up CGI ` php://input ` and ` php://output ` streams.
84
+
85
+ ``` php
86
+ use Phpro\ResourceStream\Factory\IOStream;
87
+
88
+ $input = IOStream::input();
89
+ $output = IOStream::output();
90
+ ```
91
+
69
92
### MemoryStream
70
93
71
94
Creates an in-memory stream for you to use.
You can’t perform that action at this time.
0 commit comments