1 | <?php |
||||
2 | |||||
3 | namespace Http\Message\Encoding; |
||||
4 | |||||
5 | use Clue\StreamFilter as Filter; |
||||
6 | use Psr\Http\Message\StreamInterface; |
||||
7 | |||||
8 | /** |
||||
9 | * Stream decompress (RFC 1950). |
||||
10 | * |
||||
11 | * @author Joel Wurtz <[email protected]> |
||||
12 | */ |
||||
13 | class DecompressStream extends FilteredStream |
||||
14 | { |
||||
15 | /** |
||||
16 | * @param int $level |
||||
17 | */ |
||||
18 | public function __construct(StreamInterface $stream, $level = -1) |
||||
19 | 6 | { |
|||
20 | if (!extension_loaded('zlib')) { |
||||
21 | 6 | throw new \RuntimeException('The zlib extension must be enabled to use this stream'); |
|||
22 | 1 | } |
|||
23 | |||||
24 | parent::__construct($stream, ['window' => 15]); |
||||
25 | 5 | ||||
26 | // @deprecated will be removed in 2.0 |
||||
27 | $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 15, 'level' => $level]); |
||||
0 ignored issues
–
show
The function
fun was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
28 | 5 | } |
|||
29 | 5 | ||||
30 | /** |
||||
31 | * {@inheritdoc} |
||||
32 | */ |
||||
33 | protected function readFilter() |
||||
34 | 5 | { |
|||
35 | return 'zlib.inflate'; |
||||
36 | 5 | } |
|||
37 | |||||
38 | /** |
||||
39 | * {@inheritdoc} |
||||
40 | */ |
||||
41 | protected function writeFilter() |
||||
42 | 5 | { |
|||
43 | return 'zlib.deflate'; |
||||
44 | 5 | } |
|||
45 | } |
||||
46 |
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.