ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
- Public Member Functions inherited from OLE_PPS
 OLE_PPS ($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
 The constructor.
 _DataLen ()
 Returns the amount of data saved for this PPS.
 _getPpsWk ()
 Returns a string with the PPS's WK (What is a WK?)
 _savePpsSetPnt (&$pps_array)
 Updates index and pointers to previous, next and children PPS's for this PPS.

Data Fields

 $_tmp_dir
- Data Fields inherited from OLE_PPS
 $No
 $Name
 $Type
 $PrevPps
 $NextPps
 $DirPps
 $Time1st
 $Time2nd
 $_StartBlock
 $Size
 $_data
 $children = array()

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$dataThe 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$nameThe name of the file (in Unicode)
See Also
OLE::Asc2Ucs()

Definition at line 47 of file File.php.

References OLE_PPS\OLE_PPS(), and OLE_PPS_TYPE_FILE.

{
$this->_tmp_dir = '';
$this->OLE_PPS(
null,
$name,
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$dirThe 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: