File tree Expand file tree Collapse file tree 4 files changed +8
-38
lines changed
Expand file tree Collapse file tree 4 files changed +8
-38
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ built on top of for [ReactPHP](https://reactphp.org).
1717 * [ Cursor] ( #cursor )
1818 * [ History] ( #history )
1919 * [ Autocomplete] ( #autocomplete )
20- * [ Advanced] ( #advanced )
21- * [ Stdout] ( #stdout )
22- * [ Stdin] ( #stdin )
2320* [ Pitfalls] ( #pitfalls )
2421* [ Install] ( #install )
2522* [ Tests] ( #tests )
@@ -456,35 +453,6 @@ disable the autocomplete function:
456453$readline->setAutocomplete(null);
457454```
458455
459- ### Advanced
460-
461- #### Stdout
462-
463- [ Deprecated] The ` Stdout ` represents a ` WritableStream ` and is responsible for handling console output.
464-
465- Interfacing with it directly is * not recommended* and considered * advanced usage* .
466-
467- If you want to print some text to console output, use the [ ` Stdio::write() ` ] ( #output ) instead:
468-
469- ``` php
470- $stdio->write('hello');
471- ```
472-
473- #### Stdin
474-
475- [ Deprecated] The ` Stdin ` represents a ` ReadableStream ` and is responsible for handling console input.
476-
477- Interfacing with it directly is * not recommended* and considered * advanced usage* .
478-
479- If you want to read a line from console input, use the [ ` Stdio::on() ` ] ( #input ) instead:
480-
481- ``` php
482- $stdio->on('data', function ($line) use ($stdio) {
483- $line = rtrim($line, "\r\n");
484- $stdio->write('You said "' . $line . '"' . PHP_EOL);
485- });
486- ```
487-
488456## Pitfalls
489457
490458The [ ` Readline ` ] ( #readline ) has to redraw the current user
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Clue \React \Stdio ;
3+ namespace Clue \React \Stdio \ Io ;
44
55use React \Stream \Stream ;
66use React \EventLoop \LoopInterface ;
77
88/**
9- * @deprecated
9+ * @internal
1010 */
1111class Stdin extends Stream
1212{
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Clue \React \Stdio ;
3+ namespace Clue \React \Stdio \ Io ;
44
55use React \Stream \WritableStream ;
66
77/**
8- * @deprecated
8+ * @internal
99 */
1010class Stdout extends WritableStream
1111{
Original file line number Diff line number Diff line change 22
33namespace Clue \React \Stdio ;
44
5+ use Clue \React \Stdio \Io \Stdin ;
6+ use Clue \React \Stdio \Io \Stdout ;
57use Evenement \EventEmitter ;
6- use React \Stream \DuplexStreamInterface ;
78use React \EventLoop \LoopInterface ;
9+ use React \Stream \DuplexStreamInterface ;
810use React \Stream \ReadableStreamInterface ;
9- use React \Stream \WritableStreamInterface ;
1011use React \Stream \Util ;
12+ use React \Stream \WritableStreamInterface ;
1113
1214class Stdio extends EventEmitter implements DuplexStreamInterface
1315{
You can’t perform that action at this time.
0 commit comments