ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPExcel_Shared_OLE_PPS Class Reference
+ Inheritance diagram for PHPExcel_Shared_OLE_PPS:
+ Collaboration diagram for PHPExcel_Shared_OLE_PPS:

Public Member Functions

 __construct ($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...
 

Static Public Member Functions

static _savePpsSetPnt (&$raList, $to_save, $depth=0)
 Updates index and pointers to previous, next and children PPS's for this PPS. More...
 

Data Fields

 $No
 
 $Name
 
 $Type
 
 $PrevPps
 
 $NextPps
 
 $DirPps
 
 $Time1st
 
 $Time2nd
 
 $_StartBlock
 
 $Size
 
 $_data
 
 $children = array()
 
 $ole
 

Detailed Description

Definition at line 30 of file PPS.php.

Constructor & Destructor Documentation

◆ __construct()

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

The constructor.

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

References $children, $data, and $No.

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

Member Function Documentation

◆ _DataLen()

PHPExcel_Shared_OLE_PPS::_DataLen ( )

Returns the amount of data saved for this PPS.

public

Returns
integer The amount of data (in bytes)

Definition at line 150 of file PPS.php.

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

◆ _getPpsWk()

PHPExcel_Shared_OLE_PPS::_getPpsWk ( )

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

public

Returns
string The binary string

Definition at line 170 of file PPS.php.

References $ret, and PHPExcel_Shared_OLE\LocalDate2OLE().

Referenced by PHPExcel_Shared_OLE_PPS_Root\_savePps().

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

◆ _savePpsSetPnt()

static PHPExcel_Shared_OLE_PPS::_savePpsSetPnt ( $raList,
  $to_save,
  $depth = 0 
)
static

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.

public

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

Definition at line 203 of file PPS.php.

Referenced by PHPExcel_Shared_OLE_PPS_Root\save().

204  {
205  if ( !is_array($to_save) || (empty($to_save)) ) {
206  return 0xFFFFFFFF;
207  } elseif( count($to_save) == 1 ) {
208  $cnt = count($raList);
209  // If the first entry, it's the root... Don't clone it!
210  $raList[$cnt] = ( $depth == 0 ) ? $to_save[0] : clone $to_save[0];
211  $raList[$cnt]->No = $cnt;
212  $raList[$cnt]->PrevPps = 0xFFFFFFFF;
213  $raList[$cnt]->NextPps = 0xFFFFFFFF;
214  $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++);
215  } else {
216  $iPos = floor(count($to_save) / 2);
217  $aPrev = array_slice($to_save, 0, $iPos);
218  $aNext = array_slice($to_save, $iPos + 1);
219  $cnt = count($raList);
220  // If the first entry, it's the root... Don't clone it!
221  $raList[$cnt] = ( $depth == 0 ) ? $to_save[$iPos] : clone $to_save[$iPos];
222  $raList[$cnt]->No = $cnt;
223  $raList[$cnt]->PrevPps = self::_savePpsSetPnt($raList, $aPrev, $depth++);
224  $raList[$cnt]->NextPps = self::_savePpsSetPnt($raList, $aNext, $depth++);
225  $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++);
226 
227  }
228  return $cnt;
229  }
+ Here is the caller graph for this function:

Field Documentation

◆ $_data

PHPExcel_Shared_OLE_PPS::$_data

Definition at line 96 of file PPS.php.

◆ $_StartBlock

PHPExcel_Shared_OLE_PPS::$_StartBlock

Definition at line 84 of file PPS.php.

◆ $children

PHPExcel_Shared_OLE_PPS::$children = array()

Definition at line 102 of file PPS.php.

Referenced by __construct().

◆ $DirPps

PHPExcel_Shared_OLE_PPS::$DirPps

Definition at line 66 of file PPS.php.

◆ $Name

PHPExcel_Shared_OLE_PPS::$Name

Definition at line 42 of file PPS.php.

◆ $NextPps

PHPExcel_Shared_OLE_PPS::$NextPps

Definition at line 60 of file PPS.php.

◆ $No

PHPExcel_Shared_OLE_PPS::$No

Definition at line 36 of file PPS.php.

Referenced by __construct().

◆ $ole

PHPExcel_Shared_OLE_PPS::$ole

Definition at line 108 of file PPS.php.

◆ $PrevPps

PHPExcel_Shared_OLE_PPS::$PrevPps

Definition at line 54 of file PPS.php.

◆ $Size

PHPExcel_Shared_OLE_PPS::$Size

Definition at line 90 of file PPS.php.

◆ $Time1st

PHPExcel_Shared_OLE_PPS::$Time1st

Definition at line 72 of file PPS.php.

◆ $Time2nd

PHPExcel_Shared_OLE_PPS::$Time2nd

Definition at line 78 of file PPS.php.

◆ $Type

PHPExcel_Shared_OLE_PPS::$Type

Definition at line 48 of file PPS.php.


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