function __construct(&$opts = NULL, STREAMHandler $h = NULL) { $this->content_type = "image/png"; $this->extension = "png"; parent::__construct($opts, $h); $this->multigroup = true; }
function __construct(&$opts = NULL, STREAMHandler $h = NULL) { global $CSV_SEPARATOR; global $CSV_DATE_FORMAT; $this->content_type = "text/csv"; $this->extension = "csv"; parent::__construct($opts, $h); if ($opts) { $this->separator = $opts['separator']; $this->date_format = $opts['date_format']; if ($opts['accept_null_values']) { $this->nullwriter = true; } } if (!$this->separator) { $this->separator = $CSV_SEPARATOR; } if (!$this->date_format) { $this->date_format = $CSV_DATE_FORMAT; } }
function SequenceEnd($flags = 0) { $this->xls->close(); if ($this->tmpfile) { if ($this->filemode) { $this->h->WriteData($this->tmpfile); } else { $this->h->WriteFile($this->tmpfile); } unlink($this->tmpfile); } parent::SequenceEnd($flags); }
function GroupEnd($flags = 0) { switch ($this->type) { case self::TYPE_TDMS: if ($this->data && $this->data[0]) { $this->TDMSWriteSegment(true); } break; case self::TYPE_STREAMARRAY: $this->hout->Write(pack("{$this->integer_format}", 0)); break; case self::TYPE_ARRAY: $this->hout->Close(); unset($this->hout); $data = pack($this->integer_format, $this->processed_vectors); $f = fopen($this->tmpfile, "r+"); if (!$f) { throw new ADEIException(translate("Internal error. LABVIEW data handler is not able to open temporary file (%s)", $this->tmpfile)); } fwrite($f, $data, 4); fclose($f); if ($this->filemode) { $this->h->WriteData($this->tmpfile); } else { $this->h->WriteFile($this->tmpfile); } unlink($this->tmpfile); break; } parent::GroupEnd($flags); }