Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 require_once ('classes/OLE/PPS.php');
00024
00032 class OLE_PPS_File extends OLE_PPS
00033 {
00038 var $_tmp_dir;
00039
00047 function OLE_PPS_File($name)
00048 {
00049 $this->_tmp_dir = '';
00050 $this->OLE_PPS(
00051 null,
00052 $name,
00053 OLE_PPS_TYPE_FILE,
00054 null,
00055 null,
00056 null,
00057 null,
00058 null,
00059 '',
00060 array());
00061 }
00062
00070 function setTempDir($dir)
00071 {
00072 if (is_dir($dir)) {
00073 $this->_tmp_dir = $dir;
00074 return true;
00075 }
00076 return false;
00077 }
00078
00085 function init()
00086 {
00087 $this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_File");
00088 $fh = @fopen($this->_tmp_filename, "w+b");
00089 if ($fh == false) {
00090 return $this->raiseError("Can't create temporary file");
00091 }
00092 $this->_PPS_FILE = $fh;
00093 if ($this->_PPS_FILE) {
00094 fseek($this->_PPS_FILE, 0);
00095 }
00096 }
00097
00104 function append($data)
00105 {
00106 if ($this->_PPS_FILE) {
00107 fwrite($this->_PPS_FILE, $data);
00108 }
00109 else {
00110 $this->_data .= $data;
00111 }
00112 }
00113 }
00114 ?>