28 public function filter($in, $out, &$consumed, $closing): int
30 while ($bucket = stream_bucket_make_writeable($in))
32 $this->code .= $bucket->data;
33 $consumed += $bucket->datalen;
36 if ($closing || feof($this->stream))
38 $params = explode(
'/', str_replace(self::FILTER_IDENTIFIER.
'.',
'', $this->filtername));
39 $sourceEncoding = $params[0];
44 $this->code = Encoding::convertEncoding($this->code, $sourceEncoding,
$targetEncoding);
47 $bucket = stream_bucket_new($this->stream, $this->code);
48 stream_bucket_append($out, $bucket);