Properties

$No

$No : integer

The PPS index.

Type

integer

$Name

$Name : string

The PPS name (in Unicode).

Type

string

$Type

$Type : integer

The PPS type. Dir, Root or File.

Type

integer

$PrevPps

$PrevPps : integer

The index of the previous PPS.

Type

integer

$NextPps

$NextPps : integer

The index of the next PPS.

Type

integer

$DirPps

$DirPps : integer

The index of it's first child if this is a Dir or Root PPS.

Type

integer

$Time1st

$Time1st : integer

A timestamp.

Type

integer

$Time2nd

$Time2nd : integer

A timestamp.

Type

integer

$startBlock

$startBlock : integer

Starting block (small or big) for this PPS's data inside the container.

Type

integer

$Size

$Size : integer

The size of the PPS's data (in bytes).

Type

integer

$_data

$_data : string

The PPS's data (only used if it's not using a temporary file).

Type

string

$children

$children : array

Array of child PPS's (only used by Root and Dir PPS's).

Type

array

$tempDirectory

$tempDirectory : string

Directory for temporary files.

Type

string

$fileHandle

$fileHandle : resource

Type

resource

$tempFilename

$tempFilename : string

Type

string

$smallBlockSize

$smallBlockSize : integer

Type

integer

$bigBlockSize

$bigBlockSize : integer

Type

integer

Methods

__construct()

__construct(integer  $time_1st, integer  $time_2nd, array<mixed,\PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File>  $raChild) 

The constructor.

Parameters

integer $time_1st

A timestamp

integer $time_2nd

A timestamp

array<mixed,\PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File> $raChild

getDataLen()

getDataLen() : integer

Returns the amount of data saved for this PPS.

Returns

integer —

The amount of data (in bytes)

_getPpsWk()

_getPpsWk() : string

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

Returns

string —

The binary string

_savePpsSetPnt()

_savePpsSetPnt(  $raList, mixed  $to_save, mixed  $depth) : integer

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.

Parameters

$raList
mixed $to_save
mixed $depth

Returns

integer —

The index for this PPS

save()

save(resource|string  $filename) : boolean

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. If a resource pointer to a stream created by fopen() is passed it will be used, but you have to close such stream by yourself.

Parameters

resource|string $filename

the name of the file or stream where to save the OLE container

Throws

\PhpOffice\PhpSpreadsheet\Writer\Exception

Returns

boolean —

true on success

_calcSize()

_calcSize(array  $raList) : array<mixed,float>

Calculate some numbers.

Parameters

array $raList

Reference to an array of PPS's

Returns

array<mixed,float> —

The array of numbers

_saveHeader()

_saveHeader(integer  $iSBDcnt, integer  $iBBcnt, integer  $iPPScnt) 

Save OLE header.

Parameters

integer $iSBDcnt
integer $iBBcnt
integer $iPPScnt

_saveBigData()

_saveBigData(integer  $iStBlk,   $raList) 

Saving big data (PPS's with data bigger than \PhpOffice\PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL).

Parameters

integer $iStBlk
$raList

_makeSmallData()

_makeSmallData(  $raList) : string

get small data (PPS's with data smaller than \PhpOffice\PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL).

Parameters

$raList

Returns

string

_savePps()

_savePps(array  $raList) 

Saves all the PPS's WKs.

Parameters

array $raList

Reference to an array with all PPS's

_saveBbd()

_saveBbd(integer  $iSbdSize, integer  $iBsize, integer  $iPpsCnt) 

Saving Big Block Depot.

Parameters

integer $iSbdSize
integer $iBsize
integer $iPpsCnt

adjust2()

adjust2(integer  $i2) : float

Helper function for caculating a magic value for block sizes.

Parameters

integer $i2

The argument

Returns

float