ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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. More...
 
 _DataLen ()
 Returns the amount of data saved for this PPS. More...
 
 _getPpsWk ()
 Returns a string with the PPS's WK (What is a WK?) More...
 
 _savePpsSetPnt (&$pps_array)
 Updates index and pointers to previous, next and children PPS's for this PPS. More...
 
- Public Member Functions inherited from PEAR
 PEAR ($error_class=null)
 Constructor. More...
 
 _PEAR ()
 Destructor (the emulated type of...). More...
 
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. More...
 
 registerShutdownFunc ($func, $args=array())
 Use this function to register a shutdown method for static classes. More...
 
 isError ($data, $code=null)
 Tell whether a value is a PEAR error. More...
 
 setErrorHandling ($mode=null, $options=null)
 Sets how errors generated by this object should be handled. More...
 
 expectError ($code=' *')
 This method is used to tell which errors you expect to get. More...
 
 popExpect ()
 This method pops one element off the expected error codes stack. More...
 
 _checkDelExpect ($error_code)
 This method checks unsets an error code if available. More...
 
 delExpect ($error_code)
 This method deletes all occurences of the specified element from the expected error codes stack. More...
 
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. More...
 
throwError ($message=null, $code=null, $userinfo=null)
 Simpler form of raiseError with fewer options. More...
 
 staticPushErrorHandling ($mode, $options=null)
 
 staticPopErrorHandling ()
 
 pushErrorHandling ($mode, $options=null)
 Push a new error handler on top of the error handler options stack. More...
 
 popErrorHandling ()
 Pop the last error handler used. More...
 
 loadExtension ($ext)
 OS independant PHP extension load. More...
 

Data Fields

 $No
 
 $Name
 
 $Type
 
 $PrevPps
 
 $NextPps
 
 $DirPps
 
 $Time1st
 
 $Time2nd
 
 $_StartBlock
 
 $Size
 
 $_data
 
 $children = array()
 
 $ole
 
- 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

◆ _DataLen()

OLE_PPS::_DataLen ( )

Returns the amount of data saved for this PPS.

@access private

Returns
integer The amount of data (in bytes)

Definition at line 153 of file PPS.php.

154 {
155 if (!isset($this->_data)) {
156 return 0;
157 }
158 if (isset($this->_PPS_FILE)) {
159 fseek($this->_PPS_FILE, 0);
160 $stats = fstat($this->_PPS_FILE);
161 return $stats[7];
162 } else {
163 return strlen($this->_data);
164 }
165 }

◆ _getPpsWk()

OLE_PPS::_getPpsWk ( )

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

@access private

Returns
string The binary string

Definition at line 173 of file PPS.php.

174 {
176 for ($i = 0; $i < (64 - strlen($this->Name)); $i++) {
177 $ret .= "\x00";
178 }
179 $ret .= pack("v", strlen($this->Name) + 2) // 66
180 . pack("c", $this->Type) // 67
181 . pack("c", 0x00) //UK // 68
182 . pack("V", $this->PrevPps) //Prev // 72
183 . pack("V", $this->NextPps) //Next // 76
184 . pack("V", $this->DirPps) //Dir // 80
185 . "\x00\x09\x02\x00" // 84
186 . "\x00\x00\x00\x00" // 88
187 . "\xc0\x00\x00\x00" // 92
188 . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root
189 . "\x00\x00\x00\x00" // 100
190 . OLE::LocalDate2OLE($this->Time1st) // 108
191 . OLE::LocalDate2OLE($this->Time2nd) // 116
192 . pack("V", isset($this->_StartBlock)?
193 $this->_StartBlock:0) // 120
194 . pack("V", $this->Size) // 124
195 . pack("V", 0); // 128
196 return $ret;
197 }
$Name
Definition: PPS.php:45
LocalDate2OLE($date=null)
Utility function Returns a string for the OLE container with the date given.
Definition: OLE.php:491

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

Referenced by OLE_PPS_Root\_savePps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _savePpsSetPnt()

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.

@access 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 208 of file PPS.php.

209 {
210 $pps_array[count($pps_array)] = &$this;
211 $this->No = count($pps_array) - 1;
212 $this->PrevPps = 0xFFFFFFFF;
213 $this->NextPps = 0xFFFFFFFF;
214 if (count($this->children) > 0) {
215 $this->DirPps = $this->children[0]->_savePpsSetPnt($pps_array);
216 } else {
217 $this->DirPps = 0xFFFFFFFF;
218 }
219 return $this->No;
220 }
$No
Definition: PPS.php:39

References $No.

Referenced by OLE_PPS_Root\save().

+ Here is the caller graph for this function:

◆ OLE_PPS()

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

The constructor.

@access public

Parameters
integer$NoThe PPS index
string$nameThe PPS name
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
string$dataThe (usually binary) source data of the PPS
array$childrenArray containing children PPS for this PPS

Definition at line 128 of file PPS.php.

129 {
130 $this->No = $No;
131 $this->Name = $name;
132 $this->Type = $type;
133 $this->PrevPps = $prev;
134 $this->NextPps = $next;
135 $this->DirPps = $dir;
136 $this->Time1st = $time_1st;
137 $this->Time2nd = $time_2nd;
138 $this->_data = $data;
139 $this->children = $children;
140 if ($data != '') {
141 $this->Size = strlen($data);
142 } else {
143 $this->Size = 0;
144 }
145 }
$children
Definition: PPS.php:105
$data

References $children, $data, and $No.

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

+ Here is the caller graph for this function:

Field Documentation

◆ $_data

OLE_PPS::$_data

Definition at line 99 of file PPS.php.

◆ $_StartBlock

OLE_PPS::$_StartBlock

Definition at line 87 of file PPS.php.

◆ $children

OLE_PPS::$children = array()

Definition at line 105 of file PPS.php.

Referenced by OLE_PPS().

◆ $DirPps

OLE_PPS::$DirPps

Definition at line 69 of file PPS.php.

◆ $Name

OLE_PPS::$Name

Definition at line 45 of file PPS.php.

Referenced by _getPpsWk().

◆ $NextPps

OLE_PPS::$NextPps

Definition at line 63 of file PPS.php.

◆ $No

OLE_PPS::$No

Definition at line 39 of file PPS.php.

Referenced by _savePpsSetPnt(), and OLE_PPS().

◆ $ole

OLE_PPS::$ole

Definition at line 111 of file PPS.php.

◆ $PrevPps

OLE_PPS::$PrevPps

Definition at line 57 of file PPS.php.

◆ $Size

OLE_PPS::$Size

Definition at line 93 of file PPS.php.

◆ $Time1st

OLE_PPS::$Time1st

Definition at line 75 of file PPS.php.

◆ $Time2nd

OLE_PPS::$Time2nd

Definition at line 81 of file PPS.php.

◆ $Type

OLE_PPS::$Type

Definition at line 51 of file PPS.php.


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