Public Member Functions | Data Fields

OLE_PPS_File Class Reference

Inheritance diagram for OLE_PPS_File:
Collaboration diagram for OLE_PPS_File:

Public Member Functions

 OLE_PPS_File ($name)
 The constructor.
 setTempDir ($dir)
 Sets the temp dir used for storing the OLE file.
 init ()
 Initialization method.
 append ($data)
 Append data to PPS.

Data Fields

 $_tmp_dir

Detailed Description

Definition at line 32 of file File.php.


Member Function Documentation

OLE_PPS_File::append ( data  ) 

Append data to PPS.

public

Parameters:
string $data The data to append

Definition at line 104 of file File.php.

References $data.

    {
        if ($this->_PPS_FILE) {
            fwrite($this->_PPS_FILE, $data);
        }
        else {
            $this->_data .= $data;
        }
    }

OLE_PPS_File::init (  ) 

Initialization method.

Has to be called right after OLE_PPS_File().

public

Returns:
mixed true on success. PEAR_Error on failure

Definition at line 85 of file File.php.

    {
        $this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_File");
        $fh = @fopen($this->_tmp_filename, "w+b");
        if ($fh == false) {
            return $this->raiseError("Can't create temporary file");
        }
        $this->_PPS_FILE = $fh;
        if ($this->_PPS_FILE) {
            fseek($this->_PPS_FILE, 0);
        }
    }

OLE_PPS_File::OLE_PPS_File ( name  ) 

The constructor.

public

Parameters:
string $name The name of the file (in Unicode)
See also:
OLE::Asc2Ucs()

Definition at line 47 of file File.php.

References OLE_PPS::OLE_PPS().

    {
        $this->_tmp_dir = '';
        $this->OLE_PPS(
            null, 
            $name,
            OLE_PPS_TYPE_FILE,
            null,
            null,
            null,
            null,
            null,
            '',
            array());
    }

Here is the call graph for this function:

OLE_PPS_File::setTempDir ( dir  ) 

Sets the temp dir used for storing the OLE file.

public

Parameters:
string $dir The dir to be used as temp dir
Returns:
true if given dir is valid, false otherwise

Definition at line 70 of file File.php.

References $dir.

    {
        if (is_dir($dir)) {
            $this->_tmp_dir = $dir;
            return true;
        }
        return false;
    }


Field Documentation

OLE_PPS_File::$_tmp_dir

Definition at line 38 of file File.php.


The documentation for this class was generated from the following file: