3
class STREAMFilter extends STREAMHandler implements STREAMSequenceInterface, STREAMWriterInterface {
7
function __construct(FILTER $object, STREAMHandler $next = NULL, $flags = 0) {
8
parent::__construct($object, $next, $flags);
10
$this->joiner = $this->object->IsJoiner();
13
function Connect(STREAMHandler $next) {
14
$this->object->SetOutput($next);
16
return parent::Connect($next);
20
function SequenceStart(&$args = NUL) {
23
$new_args['expected_blocks'] = 1;
24
parent::SequenceStart($new_args);
26
if ($this->saved_next)
27
$this->object->SetOutput($this->next);
32
$this->object->Open($args);
34
parent::SequenceStart($args);
36
if ($this->saved_next)
37
$this->object->SetOutput($this->next);
41
function Start(&$args = NULL) {
45
$new_args['block_number'] = $this->count;
52
$this->object->Open($args);
55
$this->object->BlockStart($args);
59
$this->object->BlockEnd($this->next);
62
$this->object->Close($this->next);
67
function SequenceEnd() {
69
$this->object->Close($this->next);
73
if ($this->saved_next)
74
$this->object->SetOutput($this->saved_next);
76
parent::SequenceEnd();
79
function WriteData(&$data, $flags=false) {
80
$this->object->WriteData($data, $flags);
81
if (!$this->object->filewriter) $this->object->StreamData($this->next);
84
function RequestFilemode() {
85
$this->filemode = $this->object->RequestFilemode();
86
return $this->filemode;
b'\\ No newline at end of file'