class Root extends PPS (View source)

Class for creating Root PPS's for OLE containers.

Properties

int $No The PPS index. from PPS
string $Name The PPS name (in Unicode). from PPS
int $Type The PPS type. Dir, Root or File. from PPS
int $PrevPps The index of the previous PPS. from PPS
int $NextPps The index of the next PPS. from PPS
int $DirPps The index of it's first child if this is a Dir or Root PPS. from PPS
int $Time1st A timestamp. from PPS
int $Time2nd A timestamp. from PPS
int $startBlock Starting block (small or big) for this PPS's data inside the container. from PPS
int $Size The size of the PPS's data (in bytes). from PPS
string $_data The PPS's data (only used if it's not using a temporary file). from PPS
array $children Array of child PPS's (only used by Root and Dir PPS's). from PPS
OLE $ole Pointer to OLE container. from PPS
protected string $tempDirectory Directory for temporary files.

Methods

__construct(int $time_1st, int $time_2nd, File[] $raChild)

No description

int
getDataLen()

Returns the amount of data saved for this PPS.

from PPS
string
_getPpsWk()

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

from PPS
static int
_savePpsSetPnt(array $raList, mixed $to_save, mixed $depth = 0)

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.

from PPS
bool
save(resource|string $filename)

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

float[]
_calcSize(array $raList)

Calculate some numbers.

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

Save OLE header.

_saveBigData(int $iStBlk, array $raList)

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

string
_makeSmallData(array $raList)

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

_savePps(array $raList)

Saves all the PPS's WKs.

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

Saving Big Block Depot.

Details

__construct(int $time_1st, int $time_2nd, File[] $raChild)

Parameters

int $time_1st A timestamp
int $time_2nd A timestamp
File[] $raChild

int getDataLen()

Returns the amount of data saved for this PPS.

Return Value

int The amount of data (in bytes)

string _getPpsWk()

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

Return Value

string The binary string

static int _savePpsSetPnt(array $raList, mixed $to_save, mixed $depth = 0)

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

array $raList &$raList Reference to the array of PPS's for the whole OLE container
mixed $to_save
mixed $depth

Return Value

int The index for this PPS

bool save(resource|string $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. 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

Return Value

bool true on success

Exceptions

Exception

float[] _calcSize(array $raList)

Calculate some numbers.

Parameters

array $raList Reference to an array of PPS's

Return Value

float[] The array of numbers

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

Save OLE header.

Parameters

int $iSBDcnt
int $iBBcnt
int $iPPScnt

_saveBigData(int $iStBlk, array $raList)

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

Parameters

int $iStBlk
array $raList &$raList Reference to array of PPS's

string _makeSmallData(array $raList)

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

Parameters

array $raList &$raList Reference to array of PPS's

Return Value

string

_savePps(array $raList)

Saves all the PPS's WKs.

Parameters

array $raList Reference to an array with all PPS's

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

Saving Big Block Depot.

Parameters

int $iSbdSize
int $iBsize
int $iPpsCnt