1 | <?php |
||
9 | class TwoWayStream implements ReadableStream, WritableStream |
||
10 | { |
||
11 | /** |
||
12 | * @var Pipe $reader |
||
13 | */ |
||
14 | private $reader; |
||
15 | |||
16 | /** |
||
17 | * @var Pipe $writer |
||
18 | */ |
||
19 | private $writer; |
||
20 | |||
21 | /** |
||
22 | * @param Pipe $reader The pipe which data is received |
||
23 | * @param Pipe $writer The pipe which data is sent |
||
24 | * |
||
25 | * @return void |
||
|
|||
26 | */ |
||
27 | public function __construct(Pipe $reader, Pipe $writer) |
||
32 | |||
33 | /** |
||
34 | * {@inheritDoc} |
||
35 | */ |
||
36 | public function read() |
||
40 | |||
41 | /** |
||
42 | * {@inheritDoc} |
||
43 | */ |
||
44 | public function write($content) |
||
50 | } |
||
51 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.