3
class STREAMFileWriter extends STREAMHandler implements STREAMSequenceInterface, STREAMWriterInterface {
6
function __construct(IO $object, STREAMHandler $next = NULL, $flags = 0) {
8
$this->filename = false;
9
elseif (is_string($object->output)) {
10
$this->filename = $object->output;
12
throw new ADEIException(translate("Invalid IO object is passed to the constructor of STREAMFilemodeConverter. Could not guess output file name."));
14
parent::__construct($object, $next, $flags);
17
function Start(&$args = NULL) {
20
if ($this->object->output)
21
$this->object->Open();
23
if (($args)&&($args['extension']))
24
$this->filename = GetTmpFile("adei_stream_filewriter_", $args['extension']);
26
$this->filename = GetTmpFile("adei_stream_filewriter_");
28
$this->object->Open($this->filename);
33
$this->object->Close();
34
$this->next->WriteData($this->filename);
b'\\ No newline at end of file'