ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
OLE_PPS Class Reference
+ Inheritance diagram for OLE_PPS:
+ Collaboration diagram for OLE_PPS:

Public Member Functions

 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

 $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 33 of file PPS.php.

Member Function Documentation

OLE_PPS::_DataLen ( )

Returns the amount of data saved for this PPS.

private

Returns
integer The amount of data (in bytes)

Definition at line 147 of file PPS.php.

{
if (!isset($this->_data)) {
return 0;
}
if (isset($this->_PPS_FILE))
{
fseek($this->_PPS_FILE, 0);
$stats = fstat($this->_PPS_FILE);
return $stats[7];
}
else {
return strlen($this->_data);
}
}
OLE_PPS::_getPpsWk ( )

Returns a string with the PPS's WK (What is a WK?)

private

Returns
string The binary string

Definition at line 169 of file PPS.php.

References $Name, $ret, and OLE\LocalDate2OLE().

Referenced by OLE_PPS_Root\_savePps().

{
for ($i = 0; $i < (64 - strlen($this->Name)); $i++) {
$ret .= "\x00";
}
$ret .= pack("v", strlen($this->Name) + 2) // 66
. pack("c", $this->Type) // 67
. pack("c", 0x00) //UK // 68
. pack("V", $this->PrevPps) //Prev // 72
. pack("V", $this->NextPps) //Next // 76
. pack("V", $this->DirPps) //Dir // 80
. "\x00\x09\x02\x00" // 84
. "\x00\x00\x00\x00" // 88
. "\xc0\x00\x00\x00" // 92
. "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root
. "\x00\x00\x00\x00" // 100
. OLE::LocalDate2OLE($this->Time1st) // 108
. OLE::LocalDate2OLE($this->Time2nd) // 116
. pack("V", isset($this->_StartBlock)?
$this->_StartBlock:0) // 120
. pack("V", $this->Size) // 124
. pack("V", 0); // 128
return $ret;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

OLE_PPS::_savePpsSetPnt ( $pps_array)

Updates index and pointers to previous, next and children PPS's for this PPS.

I don't think it'll work with Dir PPS's.

private

Parameters
array&$pps_arrayReference to the array of PPS's for the whole OLE container
Returns
integer The index for this PPS

Definition at line 204 of file PPS.php.

References $No.

Referenced by OLE_PPS_Root\save().

{
$pps_array[count($pps_array)] = &$this;
$this->No = count($pps_array) - 1;
$this->PrevPps = 0xFFFFFFFF;
$this->NextPps = 0xFFFFFFFF;
if (count($this->children) > 0) {
$this->DirPps = $this->children[0]->_savePpsSetPnt($pps_array);
}
else {
$this->DirPps = 0xFFFFFFFF;
}
return $this->No;
}

+ Here is the caller graph for this function:

OLE_PPS::OLE_PPS (   $No,
  $name,
  $type,
  $prev,
  $next,
  $dir,
  $time_1st,
  $time_2nd,
  $data,
  $children 
)

The constructor.

public

Parameters
integer$NoThe PPS index
string$nameThe PPS name (in Unicode)
integer$typeThe PPS type. Dir, Root or File
integer$prevThe index of the previous PPS
integer$nextThe index of the next PPS
integer$dirThe index of it's first child if this is a Dir or Root PPS
integer$time_1stA timestamp
integer$time_2ndA timestamp
array$childrenArray containing children PPS for this PPS

Definition at line 121 of file PPS.php.

References $children, $data, $dir, $name, $No, and $type.

Referenced by OLE_PPS_File\OLE_PPS_File(), and OLE_PPS_Root\OLE_PPS_Root().

{
$this->No = $No;
$this->Name = $name;
$this->Type = $type;
$this->PrevPps = $prev;
$this->NextPps = $next;
$this->DirPps = $dir;
$this->Time1st = $time_1st;
$this->Time2nd = $time_2nd;
$this->_data = $data;
$this->children = $children;
if ($data != '') {
$this->Size = strlen($data);
}
else {
$this->Size = 0;
}
}

+ Here is the caller graph for this function:

Field Documentation

OLE_PPS::$_data

Definition at line 99 of file PPS.php.

OLE_PPS::$_StartBlock

Definition at line 87 of file PPS.php.

OLE_PPS::$children = array()

Definition at line 105 of file PPS.php.

Referenced by OLE_PPS().

OLE_PPS::$DirPps

Definition at line 69 of file PPS.php.

OLE_PPS::$Name

Definition at line 45 of file PPS.php.

Referenced by _getPpsWk().

OLE_PPS::$NextPps

Definition at line 63 of file PPS.php.

OLE_PPS::$No

Definition at line 39 of file PPS.php.

Referenced by _savePpsSetPnt(), and OLE_PPS().

OLE_PPS::$PrevPps

Definition at line 57 of file PPS.php.

OLE_PPS::$Size

Definition at line 93 of file PPS.php.

OLE_PPS::$Time1st

Definition at line 75 of file PPS.php.

OLE_PPS::$Time2nd

Definition at line 81 of file PPS.php.

OLE_PPS::$Type

Definition at line 51 of file PPS.php.


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