2
interface DATAHandlerInterface {
3
public function SequenceStart($flags = 0);
4
public function GroupStart($title, $subseconds = false, $flags = 0);
5
public function GroupEnd($flags = 0);
6
public function SequenceEnd($flags = 0);
8
public function Start($flags = 0);
9
public function HeaderStart($flags = 0);
10
public function TimeHeader($flags = 0);
11
public function DataHeader(&$header, $i, $flags = 0);
12
public function HeaderEnd($flags = 0);
13
public function VectorStart($flags = 0);
14
public function TimeValue(&$time, $flags = 0);
15
public function DataValue(&$value, $i, $flags = 0);
16
public function VectorEnd($flags = 0);
17
public function End($flags = 0);
19
public function GetContentType();
20
public function GetExtension();
24
abstract class DATAHandler implements DATAHandlerInterface {
29
var $content_type = false;
30
var $extension = false;
35
var $multigroup = false;
36
var $filewriter = false;
37
var $filemode = false;
39
function __construct(&$opts, STREAMWriterInterface $h = NULL) {
43
if (isset($opts['content_type']))
44
$this->content_type = $opts['content_type'];
45
if (isset($opts['extension']))
46
$this->extension = $opts['extension'];
49
$this->tz = $opts['timezone'];
52
if (!$this->tz) $this->tz = "UTC";
55
function SetOutput(STREAMWriterInterface $h) {
59
function SequenceStart($flags = 0) {
60
if ($this->output) $this->h = $this->output;
66
$this->saved_tz = date_default_timezone_get ();
67
date_default_timezone_set($this->tz);
70
function GroupStart($title, $subseconds = false, $flags = 0) {
71
$this->subseconds = $subseconds;
74
function GroupEnd($flags = 0) {
77
function SequenceEnd($flags = 0) {
78
date_default_timezone_set($this->saved_tz);
87
function Start($flags = 0) {
89
function HeaderStart($flags = 0) {
91
function TimeHeader($flags = 0) {
93
function DataHeader(&$header, $i, $flags = 0) {
95
function HeaderEnd($flags = 0) {
97
function VectorStart($flags = 0) {
99
function VectorEnd($flags = 0) {
101
function End($flags = 0) {
104
function GetContentType() {
105
return $this->content_type;
107
function GetExtension() {
108
return $this->extension;
111
function RequestFilemode() {
112
if ($this->filewriter)
113
$this->filemode = true;
115
throw new ADEIException(translate("Filemode is not supported by the handler"));
122
require("handlers/csv.php");
b'\\ No newline at end of file'