ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
OLE_PPS_Root Class Reference
+ Inheritance diagram for OLE_PPS_Root:
+ Collaboration diagram for OLE_PPS_Root:

Public Member Functions

 OLE_PPS_Root ($time_1st, $time_2nd, $raChild)
 Constructor. More...
 
 setTempDir ($dir)
 Sets the temp dir used for storing the OLE file. More...
 
 save ($filename)
 Method for saving the whole OLE container (including files). More...
 
 _calcSize (&$raList)
 Calculate some numbers. More...
 
 _adjust2 ($i2)
 Helper function for caculating a magic value for block sizes. More...
 
 _saveHeader ($iSBDcnt, $iBBcnt, $iPPScnt)
 Save OLE header. More...
 
 _saveBigData ($iStBlk, &$raList)
 Saving big data (PPS's with data bigger than OLE_DATA_SIZE_SMALL) More...
 
 _makeSmallData (&$raList)
 get small data (PPS's with data smaller than OLE_DATA_SIZE_SMALL) More...
 
 _savePps (&$raList)
 Saves all the PPS's WKs. More...
 
 _saveBbd ($iSbdSize, $iBsize, $iPpsCnt)
 Saving Big Block Depot. More...
 
- Public Member Functions inherited from OLE_PPS
 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

 $_tmp_dir
 
- Data Fields inherited from OLE_PPS
 $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 Root.php.

Member Function Documentation

◆ _adjust2()

OLE_PPS_Root::_adjust2 (   $i2)

Helper function for caculating a magic value for block sizes.

@access private

Parameters
integer$i2The argument
See also
save()
Returns
integer

Definition at line 186 of file Root.php.

187 {
188 $iWk = log($i2)/log(2);
189 return ($iWk > floor($iWk))? floor($iWk)+1:$iWk;
190 }

Referenced by save().

+ Here is the caller graph for this function:

◆ _calcSize()

OLE_PPS_Root::_calcSize ( $raList)

Calculate some numbers.

@access private

Parameters
array$raListReference to an array of PPS's
Returns
array The array of numbers

Definition at line 148 of file Root.php.

149 {
150 // Calculate Basic Setting
151 list($iSBDcnt, $iBBcnt, $iPPScnt) = array(0,0,0);
152 $iSmallLen = 0;
153 $iSBcnt = 0;
154 for ($i = 0; $i < count($raList); $i++) {
155 if ($raList[$i]->Type == OLE_PPS_TYPE_FILE) {
156 $raList[$i]->Size = $raList[$i]->_DataLen();
157 if ($raList[$i]->Size < OLE_DATA_SIZE_SMALL) {
158 $iSBcnt += floor($raList[$i]->Size / $this->_SMALL_BLOCK_SIZE)
159 + (($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE)? 1: 0);
160 } else {
161 $iBBcnt += (floor($raList[$i]->Size / $this->_BIG_BLOCK_SIZE) +
162 (($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)? 1: 0));
163 }
164 }
165 }
166 $iSmallLen = $iSBcnt * $this->_SMALL_BLOCK_SIZE;
167 $iSlCnt = floor($this->_BIG_BLOCK_SIZE / OLE_LONG_INT_SIZE);
168 $iSBDcnt = floor($iSBcnt / $iSlCnt) + (($iSBcnt % $iSlCnt)? 1:0);
169 $iBBcnt += (floor($iSmallLen / $this->_BIG_BLOCK_SIZE) +
170 (( $iSmallLen % $this->_BIG_BLOCK_SIZE)? 1: 0));
171 $iCnt = count($raList);
172 $iBdCnt = $this->_BIG_BLOCK_SIZE / OLE_PPS_SIZE;
173 $iPPScnt = (floor($iCnt/$iBdCnt) + (($iCnt % $iBdCnt)? 1: 0));
174
175 return array($iSBDcnt, $iBBcnt, $iPPScnt);
176 }
const OLE_PPS_SIZE
Definition: OLE.php:31
const OLE_PPS_TYPE_FILE
Definition: OLE.php:28
const OLE_LONG_INT_SIZE
Definition: OLE.php:30
const OLE_DATA_SIZE_SMALL
Definition: OLE.php:29

References OLE_DATA_SIZE_SMALL, OLE_LONG_INT_SIZE, OLE_PPS_SIZE, and OLE_PPS_TYPE_FILE.

Referenced by save().

+ Here is the caller graph for this function:

◆ _makeSmallData()

OLE_PPS_Root::_makeSmallData ( $raList)

get small data (PPS's with data smaller than OLE_DATA_SIZE_SMALL)

@access private

Parameters
array&$raListReference to array of PPS's

Definition at line 327 of file Root.php.

328 {
329 $sRes = '';
330 $FILE = $this->_FILEH_;
331 $iSmBlk = 0;
332
333 for ($i = 0; $i < count($raList); $i++) {
334 // Make SBD, small data string
335 if ($raList[$i]->Type == OLE_PPS_TYPE_FILE) {
336 if ($raList[$i]->Size <= 0) {
337 continue;
338 }
339 if ($raList[$i]->Size < OLE_DATA_SIZE_SMALL) {
340 $iSmbCnt = floor($raList[$i]->Size / $this->_SMALL_BLOCK_SIZE)
341 + (($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE)? 1: 0);
342 // Add to SBD
343 for ($j = 0; $j < ($iSmbCnt-1); $j++) {
344 fwrite($FILE, pack("V", $j+$iSmBlk+1));
345 }
346 fwrite($FILE, pack("V", -2));
347
348 // Add to Data String(this will be written for RootEntry)
349 if ($raList[$i]->_PPS_FILE) {
350 fseek($raList[$i]->_PPS_FILE, 0); // To The Top
351 while ($sBuff = fread($raList[$i]->_PPS_FILE, 4096)) {
352 $sRes .= $sBuff;
353 }
354 } else {
355 $sRes .= $raList[$i]->_data;
356 }
357 if ($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE) {
358 for ($j = 0; $j < ($this->_SMALL_BLOCK_SIZE - ($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE)); $j++) {
359 $sRes .= "\x00";
360 }
361 }
362 // Set for PPS
363 $raList[$i]->_StartBlock = $iSmBlk;
364 $iSmBlk += $iSmbCnt;
365 }
366 }
367 }
368 $iSbCnt = floor($this->_BIG_BLOCK_SIZE / OLE_LONG_INT_SIZE);
369 if ($iSmBlk % $iSbCnt) {
370 for ($i = 0; $i < ($iSbCnt - ($iSmBlk % $iSbCnt)); $i++) {
371 fwrite($FILE, pack("V", -1));
372 }
373 }
374 return $sRes;
375 }

References OLE_DATA_SIZE_SMALL, OLE_LONG_INT_SIZE, and OLE_PPS_TYPE_FILE.

Referenced by save().

+ Here is the caller graph for this function:

◆ _saveBbd()

OLE_PPS_Root::_saveBbd (   $iSbdSize,
  $iBsize,
  $iPpsCnt 
)

Saving Big Block Depot.

@access private

Parameters
integer$iSbdSize
integer$iBsize
integer$iPpsCnt

Definition at line 407 of file Root.php.

408 {
409 $FILE = $this->_FILEH_;
410 // Calculate Basic Setting
411 $iBbCnt = $this->_BIG_BLOCK_SIZE / OLE_LONG_INT_SIZE;
412 $i1stBdL = ($this->_BIG_BLOCK_SIZE - 0x4C) / OLE_LONG_INT_SIZE;
413
414 $iBdExL = 0;
415 $iAll = $iBsize + $iPpsCnt + $iSbdSize;
416 $iAllW = $iAll;
417 $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt)? 1: 0);
418 $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW+$iBdCntW) % $iBbCnt)? 1: 0);
419 // Calculate BD count
420 if ($iBdCnt >$i1stBdL) {
421 while (1) {
422 $iBdExL++;
423 $iAllW++;
424 $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt)? 1: 0);
425 $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW+$iBdCntW) % $iBbCnt)? 1: 0);
426 if ($iBdCnt <= ($iBdExL*$iBbCnt+ $i1stBdL)) {
427 break;
428 }
429 }
430 }
431
432 // Making BD
433 // Set for SBD
434 if ($iSbdSize > 0) {
435 for ($i = 0; $i < ($iSbdSize - 1); $i++) {
436 fwrite($FILE, pack("V", $i+1));
437 }
438 fwrite($FILE, pack("V", -2));
439 }
440 // Set for B
441 for ($i = 0; $i < ($iBsize - 1); $i++) {
442 fwrite($FILE, pack("V", $i+$iSbdSize+1));
443 }
444 fwrite($FILE, pack("V", -2));
445
446 // Set for PPS
447 for ($i = 0; $i < ($iPpsCnt - 1); $i++) {
448 fwrite($FILE, pack("V", $i+$iSbdSize+$iBsize+1));
449 }
450 fwrite($FILE, pack("V", -2));
451 // Set for BBD itself ( 0xFFFFFFFD : BBD)
452 for ($i = 0; $i < $iBdCnt; $i++) {
453 fwrite($FILE, pack("V", 0xFFFFFFFD));
454 }
455 // Set for ExtraBDList
456 for ($i = 0; $i < $iBdExL; $i++) {
457 fwrite($FILE, pack("V", 0xFFFFFFFC));
458 }
459 // Adjust for Block
460 if (($iAllW + $iBdCnt) % $iBbCnt) {
461 for ($i = 0; $i < ($iBbCnt - (($iAllW + $iBdCnt) % $iBbCnt)); $i++) {
462 fwrite($FILE, pack("V", -1));
463 }
464 }
465 // Extra BDList
466 if ($iBdCnt > $i1stBdL) {
467 $iN=0;
468 $iNb=0;
469 for ($i = $i1stBdL;$i < $iBdCnt; $i++, $iN++) {
470 if ($iN >= ($iBbCnt - 1)) {
471 $iN = 0;
472 $iNb++;
473 fwrite($FILE, pack("V", $iAll+$iBdCnt+$iNb));
474 }
475 fwrite($FILE, pack("V", $iBsize+$iSbdSize+$iPpsCnt+$i));
476 }
477 if (($iBdCnt-$i1stBdL) % ($iBbCnt-1)) {
478 for ($i = 0; $i < (($iBbCnt - 1) - (($iBdCnt - $i1stBdL) % ($iBbCnt - 1))); $i++) {
479 fwrite($FILE, pack("V", -1));
480 }
481 }
482 fwrite($FILE, pack("V", -2));
483 }
484 }

References OLE_LONG_INT_SIZE.

Referenced by save().

+ Here is the caller graph for this function:

◆ _saveBigData()

OLE_PPS_Root::_saveBigData (   $iStBlk,
$raList 
)

Saving big data (PPS's with data bigger than OLE_DATA_SIZE_SMALL)

@access private

Parameters
integer$iStBlk
array&$raListReference to array of PPS's

Definition at line 277 of file Root.php.

278 {
279 $FILE = $this->_FILEH_;
280
281 // cycle through PPS's
282 for ($i = 0; $i < count($raList); $i++) {
283 if ($raList[$i]->Type != OLE_PPS_TYPE_DIR) {
284 $raList[$i]->Size = $raList[$i]->_DataLen();
285 if (($raList[$i]->Size >= OLE_DATA_SIZE_SMALL) ||
286 (($raList[$i]->Type == OLE_PPS_TYPE_ROOT) && isset($raList[$i]->_data)))
287 {
288 // Write Data
289 if (isset($raList[$i]->_PPS_FILE)) {
290 $iLen = 0;
291 fseek($raList[$i]->_PPS_FILE, 0); // To The Top
292 while($sBuff = fread($raList[$i]->_PPS_FILE, 4096)) {
293 $iLen += strlen($sBuff);
294 fwrite($FILE, $sBuff);
295 }
296 } else {
297 fwrite($FILE, $raList[$i]->_data);
298 }
299
300 if ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE) {
301 for ($j = 0; $j < ($this->_BIG_BLOCK_SIZE - ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)); $j++) {
302 fwrite($FILE, "\x00");
303 }
304 }
305 // Set For PPS
306 $raList[$i]->_StartBlock = $iStBlk;
307 $iStBlk +=
308 (floor($raList[$i]->Size / $this->_BIG_BLOCK_SIZE) +
309 (($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)? 1: 0));
310 }
311 // Close file for each PPS, and unlink it
312 if (isset($raList[$i]->_PPS_FILE)) {
313 @fclose($raList[$i]->_PPS_FILE);
314 $raList[$i]->_PPS_FILE = null;
315 @unlink($raList[$i]->_tmp_filename);
316 }
317 }
318 }
319 }
const OLE_PPS_TYPE_DIR
Definition: OLE.php:27
const OLE_PPS_TYPE_ROOT
Constants for OLE package.
Definition: OLE.php:26

References OLE_DATA_SIZE_SMALL, OLE_PPS_TYPE_DIR, and OLE_PPS_TYPE_ROOT.

Referenced by save().

+ Here is the caller graph for this function:

◆ _saveHeader()

OLE_PPS_Root::_saveHeader (   $iSBDcnt,
  $iBBcnt,
  $iPPScnt 
)

Save OLE header.

@access private

Parameters
integer$iSBDcnt
integer$iBBcnt
integer$iPPScnt

Definition at line 200 of file Root.php.

201 {
202 $FILE = $this->_FILEH_;
203
204 // Calculate Basic Setting
205 $iBlCnt = $this->_BIG_BLOCK_SIZE / OLE_LONG_INT_SIZE;
206 $i1stBdL = ($this->_BIG_BLOCK_SIZE - 0x4C) / OLE_LONG_INT_SIZE;
207
208 $iBdExL = 0;
209 $iAll = $iBBcnt + $iPPScnt + $iSBDcnt;
210 $iAllW = $iAll;
211 $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt)? 1: 0);
212 $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW+$iBdCntW) % $iBlCnt)? 1: 0);
213
214 // Calculate BD count
215 if ($iBdCnt > $i1stBdL) {
216 while (1) {
217 $iBdExL++;
218 $iAllW++;
219 $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt)? 1: 0);
220 $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW+$iBdCntW) % $iBlCnt)? 1: 0);
221 if ($iBdCnt <= ($iBdExL*$iBlCnt+ $i1stBdL)) {
222 break;
223 }
224 }
225 }
226
227 // Save Header
228 fwrite($FILE,
229 "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1"
230 . "\x00\x00\x00\x00"
231 . "\x00\x00\x00\x00"
232 . "\x00\x00\x00\x00"
233 . "\x00\x00\x00\x00"
234 . pack("v", 0x3b)
235 . pack("v", 0x03)
236 . pack("v", -2)
237 . pack("v", 9)
238 . pack("v", 6)
239 . pack("v", 0)
240 . "\x00\x00\x00\x00"
241 . "\x00\x00\x00\x00"
242 . pack("V", $iBdCnt)
243 . pack("V", $iBBcnt+$iSBDcnt) //ROOT START
244 . pack("V", 0)
245 . pack("V", 0x1000)
246 . pack("V", 0) //Small Block Depot
247 . pack("V", 1)
248 );
249 // Extra BDList Start, Count
250 if ($iBdCnt < $i1stBdL) {
251 fwrite($FILE,
252 pack("V", -2). // Extra BDList Start
253 pack("V", 0) // Extra BDList Count
254 );
255 } else {
256 fwrite($FILE, pack("V", $iAll+$iBdCnt) . pack("V", $iBdExL));
257 }
258
259 // BDList
260 for ($i = 0; $i < $i1stBdL && $i < $iBdCnt; $i++) {
261 fwrite($FILE, pack("V", $iAll+$i));
262 }
263 if ($i < $i1stBdL) {
264 for ($j = 0; $j < ($i1stBdL-$i); $j++) {
265 fwrite($FILE, (pack("V", -1)));
266 }
267 }
268 }

References OLE_LONG_INT_SIZE.

Referenced by save().

+ Here is the caller graph for this function:

◆ _savePps()

OLE_PPS_Root::_savePps ( $raList)

Saves all the PPS's WKs.

@access private

Parameters
array$raListReference to an array with all PPS's

Definition at line 383 of file Root.php.

384 {
385 // Save each PPS WK
386 for ($i = 0; $i < count($raList); $i++) {
387 fwrite($this->_FILEH_, $raList[$i]->_getPpsWk());
388 }
389 // Adjust for Block
390 $iCnt = count($raList);
391 $iBCnt = $this->_BIG_BLOCK_SIZE / OLE_PPS_SIZE;
392 if ($iCnt % $iBCnt) {
393 for ($i = 0; $i < (($iBCnt - ($iCnt % $iBCnt)) * OLE_PPS_SIZE); $i++) {
394 fwrite($this->_FILEH_, "\x00");
395 }
396 }
397 }
_getPpsWk()
Returns a string with the PPS's WK (What is a WK?)
Definition: PPS.php:173

References OLE_PPS\_getPpsWk(), and OLE_PPS_SIZE.

Referenced by save().

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

◆ OLE_PPS_Root()

OLE_PPS_Root::OLE_PPS_Root (   $time_1st,
  $time_2nd,
  $raChild 
)

Constructor.

@access public

Parameters
integer$time_1stA timestamp
integer$time_2ndA timestamp

Definition at line 48 of file Root.php.

49 {
50 $this->_tmp_dir = System::tmpdir();
51 $this->OLE_PPS(
52 null,
53 OLE::Asc2Ucs('Root Entry'),
55 null,
56 null,
57 null,
58 $time_1st,
59 $time_2nd,
60 null,
61 $raChild);
62 }
OLE_PPS($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
The constructor.
Definition: PPS.php:128
Asc2Ucs($ascii)
Utility function to transform ASCII text to Unicode.
Definition: OLE.php:473
tmpdir()
Get the path of the temporal directory set in the system by looking in its environments variables.
Definition: System.php:454

References OLE\Asc2Ucs(), OLE_PPS\OLE_PPS(), OLE_PPS_TYPE_ROOT, and System\tmpdir().

+ Here is the call graph for this function:

◆ save()

OLE_PPS_Root::save (   $filename)

Method for saving the whole OLE container (including files).

In fact, if called with an empty argument (or '-'), it saves to a temporary file and then outputs it's contents to stdout.

Parameters
string$filenameThe name of the file where to save the OLE container @access public
Returns
mixed true on success, PEAR_Error on failure

Definition at line 89 of file Root.php.

90 {
91 // Initial Setting for saving
92 $this->_BIG_BLOCK_SIZE = pow(2,
93 ((isset($this->_BIG_BLOCK_SIZE))? $this->_adjust2($this->_BIG_BLOCK_SIZE) : 9));
94 $this->_SMALL_BLOCK_SIZE= pow(2,
95 ((isset($this->_SMALL_BLOCK_SIZE))? $this->_adjust2($this->_SMALL_BLOCK_SIZE): 6));
96
97 // Open temp file if we are sending output to stdout
98 if (($filename == '-') || ($filename == '')) {
99 $this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_Root");
100 $this->_FILEH_ = @fopen($this->_tmp_filename,"w+b");
101 if ($this->_FILEH_ == false) {
102 return $this->raiseError("Can't create temporary file.");
103 }
104 } else {
105 $this->_FILEH_ = @fopen($filename, "wb");
106 if ($this->_FILEH_ == false) {
107 return $this->raiseError("Can't open $filename. It may be in use or protected.");
108 }
109 }
110 // Make an array of PPS's (for Save)
111 $aList = array();
112 $this->_savePpsSetPnt($aList);
113 // calculate values for header
114 list($iSBDcnt, $iBBcnt, $iPPScnt) = $this->_calcSize($aList); //, $rhInfo);
115 // Save Header
116 $this->_saveHeader($iSBDcnt, $iBBcnt, $iPPScnt);
117
118 // Make Small Data string (write SBD)
119 $this->_data = $this->_makeSmallData($aList);
120
121 // Write BB
122 $this->_saveBigData($iSBDcnt, $aList);
123 // Write PPS
124 $this->_savePps($aList);
125 // Write Big Block Depot and BDList and Adding Header informations
126 $this->_saveBbd($iSBDcnt, $iBBcnt, $iPPScnt);
127 // Close File, send it to stdout if necessary
128 if (($filename == '-') || ($filename == '')) {
129 fseek($this->_FILEH_, 0);
130 fpassthru($this->_FILEH_);
131 @fclose($this->_FILEH_);
132 // Delete the temporary file.
133 @unlink($this->_tmp_filename);
134 } else {
135 @fclose($this->_FILEH_);
136 }
137
138 return true;
139 }
$filename
Definition: buildRTE.php:89
_calcSize(&$raList)
Calculate some numbers.
Definition: Root.php:148
_savePps(&$raList)
Saves all the PPS's WKs.
Definition: Root.php:383
_saveHeader($iSBDcnt, $iBBcnt, $iPPScnt)
Save OLE header.
Definition: Root.php:200
_saveBbd($iSbdSize, $iBsize, $iPpsCnt)
Saving Big Block Depot.
Definition: Root.php:407
_adjust2($i2)
Helper function for caculating a magic value for block sizes.
Definition: Root.php:186
_makeSmallData(&$raList)
get small data (PPS's with data smaller than OLE_DATA_SIZE_SMALL)
Definition: Root.php:327
_saveBigData($iStBlk, &$raList)
Saving big data (PPS's with data bigger than OLE_DATA_SIZE_SMALL)
Definition: Root.php:277
_savePpsSetPnt(&$pps_array)
Updates index and pointers to previous, next and children PPS's for this PPS.
Definition: PPS.php:208
& 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 de...
Definition: PEAR.php:524

References $filename, _adjust2(), _calcSize(), _makeSmallData(), _saveBbd(), _saveBigData(), _saveHeader(), _savePps(), OLE_PPS\_savePpsSetPnt(), and PEAR\raiseError().

+ Here is the call graph for this function:

◆ setTempDir()

OLE_PPS_Root::setTempDir (   $dir)

Sets the temp dir used for storing the OLE file.

@access public

Parameters
string$dirThe dir to be used as temp dir
Returns
true if given dir is valid, false otherwise

Definition at line 71 of file Root.php.

72 {
73 if (is_dir($dir)) {
74 $this->_tmp_dir = $dir;
75 return true;
76 }
77 return false;
78 }

Field Documentation

◆ $_tmp_dir

OLE_PPS_Root::$_tmp_dir

Definition at line 39 of file Root.php.


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