Total Complexity | 8 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Coverage | 86.67% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class OutputStreamWriter |
||
14 | { |
||
15 | /** |
||
16 | * @var OutputStream 出力ストリーム |
||
17 | */ |
||
18 | protected OutputStream $stream; |
||
19 | |||
20 | /** |
||
21 | * constructor |
||
22 | * @param OutputStream $stream 出力ストリーム |
||
23 | */ |
||
24 | 15 | public function __construct(OutputStream $stream) |
|
25 | { |
||
26 | 15 | $this->stream = $stream; |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * destructor |
||
31 | */ |
||
32 | 17 | public function __destruct() |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * バッファリングしているすべての出力バイトを書き出し、出力ストリームを閉じる |
||
39 | * @throws WebStream\Exception\Extend\IOException |
||
40 | */ |
||
41 | 15 | public function close() |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * 出力ストリームに書き出す |
||
48 | * @param mixed $buf 出力データ |
||
49 | * @throws WebStream\Exception\Extend\IOException |
||
50 | */ |
||
51 | 12 | public function write($buf) |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * バッファリングしているすべての出力バイトを出力ストリームを閉じずに強制的に書き出す |
||
62 | * writeを実行した時点では書き出されておらず、flushした時点ですべて書き出す |
||
63 | * @throws WebStream\Exception\Extend\IOException |
||
64 | */ |
||
65 | 12 | public function flush() |
|
68 | } |
||
69 | |||
70 | /** |
||
71 | * 改行を書き出す |
||
72 | * @throws WebStream\Exception\Extend\IOException |
||
73 | */ |
||
74 | public function newLine() |
||
77 | } |
||
78 | } |
||
79 |