/adei/ui

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/ui

« back to all changes in this revision

Viewing changes to classes/stream/streamoutput.php

  • Committer: Suren A. Chilingaryan
  • Date: 2008-04-02 10:23:22 UTC
  • Revision ID: csa@dside.dyndns.org-20080402102322-okib92sicg2dx3o3
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
class STREAMOutput extends STREAMHandler implements STREAMSequenceInterface, STREAMWriterInterface {
 
4
 var $count;
 
5
 
 
6
 function __construct(STREAMObjectInterface $object = NULL, STREAMHandler $next = NULL, $flags = 0) {
 
7
    if (is_object($object))
 
8
        parent::__construct($object, $next, $flags);
 
9
    else
 
10
        parent::__construct(new IO($object), $next, $flags);
 
11
 }
 
12
 
 
13
 function SequenceStart(&$args = NULL) {
 
14
    if (($args)&&($args['expected_blocks'] > 1))
 
15
        throw new ADEIException(translate("Invalid STREAM. The multiple groups are not supported by STREAMOutput"));
 
16
 
 
17
    $this->count = 0;
 
18
 
 
19
    parent::SequenceStart($args);
 
20
 }
 
21
 
 
22
 function Start(&$args = NULL) {
 
23
    if ($this->count++)
 
24
        throw new ADEIException(translate("Invalid STREAM. The multiple groups are not supported by STREAMOutput"));
 
25
 
 
26
    parent::Start($args);
 
27
 
 
28
    $this->object->Open();
 
29
 }
 
30
 
 
31
 function End() {
 
32
    $this->object->Close();
 
33
 
 
34
    parent::End();
 
35
 }
 
36
}
 
37
 
 
38
 
 
39
?>
 
 
b'\\ No newline at end of file'