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).
17
17
* [ Cursor] ( #cursor )
18
18
* [ History] ( #history )
19
19
* [ Autocomplete] ( #autocomplete )
20
- * [ Advanced] ( #advanced )
21
- * [ Stdout] ( #stdout )
22
- * [ Stdin] ( #stdin )
23
20
* [ Pitfalls] ( #pitfalls )
24
21
* [ Install] ( #install )
25
22
* [ Tests] ( #tests )
@@ -456,35 +453,6 @@ disable the autocomplete function:
456
453
$readline->setAutocomplete(null);
457
454
```
458
455
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
-
488
456
## Pitfalls
489
457
490
458
The [ ` Readline ` ] ( #readline ) has to redraw the current user
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace Clue \React \Stdio ;
3
+ namespace Clue \React \Stdio \ Io ;
4
4
5
5
use React \Stream \Stream ;
6
6
use React \EventLoop \LoopInterface ;
7
7
8
8
/**
9
- * @deprecated
9
+ * @internal
10
10
*/
11
11
class Stdin extends Stream
12
12
{
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace Clue \React \Stdio ;
3
+ namespace Clue \React \Stdio \ Io ;
4
4
5
5
use React \Stream \WritableStream ;
6
6
7
7
/**
8
- * @deprecated
8
+ * @internal
9
9
*/
10
10
class Stdout extends WritableStream
11
11
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace Clue \React \Stdio ;
4
4
5
+ use Clue \React \Stdio \Io \Stdin ;
6
+ use Clue \React \Stdio \Io \Stdout ;
5
7
use Evenement \EventEmitter ;
6
- use React \Stream \DuplexStreamInterface ;
7
8
use React \EventLoop \LoopInterface ;
9
+ use React \Stream \DuplexStreamInterface ;
8
10
use React \Stream \ReadableStreamInterface ;
9
- use React \Stream \WritableStreamInterface ;
10
11
use React \Stream \Util ;
12
+ use React \Stream \WritableStreamInterface ;
11
13
12
14
class Stdio extends EventEmitter implements DuplexStreamInterface
13
15
{
You can’t perform that action at this time.
0 commit comments