11<?php
2- namespace React \Http ;
32
3+ namespace React \Http \Io ;
4+
5+ use Evenement \EventEmitter ;
46use Psr \Http \Message \StreamInterface ;
57use React \Stream \ReadableStreamInterface ;
6- use React \Stream \WritableStreamInterface ;
7- use Evenement \EventEmitter ;
88use React \Stream \Util ;
9+ use React \Stream \WritableStreamInterface ;
910
1011/**
12+ * [Internal] Bridge between StreamInterface from PSR-7 and ReadableStreamInterface from ReactPHP
13+ *
14+ * This class is used in the server to stream the body of an incoming response
15+ * from the client. This allows us to stream big amounts of data without having
16+ * to buffer this data. Similarly, this used to stream the body of an outgoing
17+ * request body to the client. The data will be sent directly to the client.
18+ *
19+ * Note that this is an internal class only and nothing you should usually care
20+ * about. See the `StreamInterface` and `ReadableStreamInterface` for more
21+ * details.
22+ *
23+ * @see StreamInterface
24+ * @see ReadableStreamInterface
1125 * @internal
12- * Uses a StreamInterface from PSR-7 and a ReadableStreamInterface from ReactPHP
13- * to use PSR-7 objects and use ReactPHP streams
14- * This is class is used in `HttpServer` to stream the body of a response
15- * to the client. Because of this you can stream big amount of data without
16- * necessity of buffering this data. The data will be send directly to the client.
1726 */
1827class HttpBodyStream extends EventEmitter implements StreamInterface, ReadableStreamInterface
1928{
@@ -22,8 +31,8 @@ class HttpBodyStream extends EventEmitter implements StreamInterface, ReadableSt
2231 private $ size ;
2332
2433 /**
25- * @param ReadableStreamInterface $input - Stream data from $stream as a body of a PSR-7 object4
26- * @param int|null $size - size of the data body
34+ * @param ReadableStreamInterface $input Stream data from $stream as a body of a PSR-7 object4
35+ * @param int|null $size size of the data body
2736 */
2837 public function __construct (ReadableStreamInterface $ input , $ size )
2938 {
0 commit comments