ILIAS  Release_3_10_x_branch Revision 61812
 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.

Data Fields

 $No
 $Name
 $Type
 $PrevPps
 $NextPps
 $DirPps
 $Time1st
 $Time2nd
 $_StartBlock
 $Size
 $_data
 $children = 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, and $No.

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: