| 1 | <?php |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 2 | |||
| 3 | namespace ClickHouseDB\Transport; |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Class StreamWrite |
||
|
0 ignored issues
–
show
|
|||
| 7 | * @package ClickHouseDB\Transport |
||
|
0 ignored issues
–
show
|
|||
| 8 | */ |
||
| 9 | class StreamWrite extends Stream |
||
| 10 | { |
||
|
0 ignored issues
–
show
|
|||
| 11 | |||
| 12 | 1 | public function __construct( $source) |
|
|
0 ignored issues
–
show
|
|||
| 13 | { |
||
|
0 ignored issues
–
show
|
|||
| 14 | |||
| 15 | 1 | parent::__construct($source); |
|
| 16 | |||
| 17 | 1 | } |
|
|
0 ignored issues
–
show
|
|||
| 18 | |||
| 19 | 1 | public function isWrite() |
|
|
0 ignored issues
–
show
|
|||
| 20 | { |
||
| 21 | 1 | return true; |
|
| 22 | } |
||
|
0 ignored issues
–
show
|
|||
| 23 | 1 | public function applyGzip() |
|
|
0 ignored issues
–
show
|
|||
| 24 | { |
||
| 25 | 1 | stream_filter_append($this->getStream(), 'zlib.deflate', STREAM_FILTER_READ, ['window' => 30]); |
|
|
0 ignored issues
–
show
|
|||
| 26 | 1 | $this->enableGzipHeader(); |
|
| 27 | 1 | } |
|
| 28 | } |
||
| 29 |