ILIAS  Release_4_0_x_branch Revision 61816
 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.
- Public Member Functions inherited from PEAR
 PEAR ($error_class=null)
 Constructor.
 _PEAR ()
 Destructor (the emulated type of...).
getStaticProperty ($class, $var)
 If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them.
 registerShutdownFunc ($func, $args=array())
 Use this function to register a shutdown method for static classes.
 isError ($data, $code=null)
 Tell whether a value is a PEAR error.
 setErrorHandling ($mode=null, $options=null)
 Sets how errors generated by this object should be handled.
 expectError ($code= '*')
 This method is used to tell which errors you expect to get.
 popExpect ()
 This method pops one element off the expected error codes stack.
 _checkDelExpect ($error_code)
 This method checks unsets an error code if available.
 delExpect ($error_code)
 This method deletes all occurences of the specified element from the expected error codes stack.
raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
 This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied.
throwError ($message=null, $code=null, $userinfo=null)
 Simpler form of raiseError with fewer options.
 staticPushErrorHandling ($mode, $options=null)
 staticPopErrorHandling ()
 pushErrorHandling ($mode, $options=null)
 Push a new error handler on top of the error handler options stack.
 popErrorHandling ()
 Pop the last error handler used.
 loadExtension ($ext)
 OS independant PHP extension load.

Data Fields

 $_tmp_dir
- Data Fields inherited from OLE_PPS
 $No
 $Name
 $Type
 $PrevPps
 $NextPps
 $DirPps
 $Time1st
 $Time2nd
 $_StartBlock
 $Size
 $_data
 $children = array()
- Data Fields inherited from PEAR
 $_debug = false
 $_default_error_mode = null
 $_default_error_options = null
 $_default_error_handler = ''
 $_error_class = 'PEAR_Error'
 $_expected_errors = 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.

References PEAR\raiseError().

{
$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);
}
}

+ Here is the call graph for this function:

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 $name, OLE_PPS\OLE_PPS(), and OLE_PPS_TYPE_FILE.

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