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_DATE_FORMAT; global $EXCEL_DATE_FORMAT; global $EXCEL_SUBSEC_FORMAT; $this->content_type = "application/vnd.ms-excel"; $this->extension = "xls"; parent::__construct($opts, $h); $this->multigroup = true; $this->filewriter = true; if ($opts) { $this->time_format = $opts['date_format']; $this->time_width = $opts['date_width']; $this->time_subsec_format = $opts['subsec_format']; $this->time_subsec_width = $opts['subsec_width']; $this->data_format = $opts['value_format']; $this->data_width = $opts['value_width']; } if (!$this->time_format) { $this->time_format = $EXCEL_DATE_FORMAT; } if (!$this->time_width) { $this->time_width = 20; } if (!$this->time_subsec_format) { $this->time_subsec_format = $EXCEL_SUBSEC_FORMAT; } if (!$this->time_subsec_width) { $this->time_width = 26; } if (!$this->data_format) { $this->data_format = "0.0000E+##"; } if (!$this->data_width) { $this->data_width = 12; } if (preg_match('/^\\s*text\\s*(\\((.*)\\))?\\s*$/i', $this->time_subsec_format, $m)) { $this->time_subsec_format = false; if ($m[2]) { $this->string_format = $m[2]; } else { $this->string_format = $CSV_DATE_FORMAT; } } }
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 __construct(&$opts = NULL, STREAMHandler $h = NULL) { if ($opts['type']) { $name = "self::TYPE_" . strtoupper($opts['type']); if (defined($name)) { $this->type = constant($name); } else { throw new ADEIException(translate("LABVIEW Data Handler is not supporting requested output type (%s)", $opts['type'])); } } else { $this->type = self::TYPE_TDMS; } if (pack("N", 1) == pack("L", 1)) { $this->system_endianess = self::BIG_ENDIAN; } else { $this->system_endianess = self::LITTLE_ENDIAN; } switch ($this->type) { case self::TYPE_TDMS: $this->content_type = "application/binary"; $this->extension = "tdms"; $this->multigroup = true; $this->output_endianess = self::LITTLE_ENDIAN; if ($opts['buffer_size'] > 1024) { $this->buffer_size = $opts['buffer_size']; } else { $this->buffer_size = self::TDMS_BUFFER_SIZE; } break; default: if ($this->type == self::TYPE_ARRAY) { $this->filewriter = true; } else { $this->multigroup = true; } $this->content_type = "application/binary"; $this->extension = "lvbin"; if ($opts['big_endian']) { $this->output_endianess = self::BIG_ENDIAN; } else { $this->output_endianess = self::LITTLE_ENDIAN; } } if ($this->output_endianess == self::BIG_ENDIAN) { $this->integer_format = "N"; } else { $this->integer_format = "V"; } if ($this->output_endianess == $this->system_endianess) { $this->convert_values = false; } else { $this->convert_values = true; } parent::__construct($opts, $h); }