Documentation

Root extends PPS
in package

Class for creating Root PPS's for OLE containers.

Tags
author

Xavier Noguer xnoguer@php.net

Table of Contents

Properties

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

Methods

__construct()  : mixed
The constructor.
getDataLen()  : int
Returns the amount of data saved for this PPS.
getPpsWk()  : string
Returns a string with the PPS's WK (What is a WK?).
save()  : bool
Method for saving the whole OLE container (including files).
savePpsSetPnt()  : int
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.

Properties

$_data

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

public string $_data = ''

$children

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

public array<string|int, mixed> $children = []

$DirPps

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

public int $DirPps

$Name

The PPS name (in Unicode).

public string $Name

$NextPps

The index of the next PPS.

public int $NextPps

$No

The PPS index.

public int $No

$ole

Pointer to OLE container.

public OLE $ole

$PrevPps

The index of the previous PPS.

public int $PrevPps

$Size

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

public int $Size

$startBlock

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

public int|null $startBlock = null

$Time1st

A timestamp.

public float|int $Time1st

$Time2nd

A timestamp.

public float|int $Time2nd

$Type

The PPS type. Dir, Root or File.

public int $Type

Methods

__construct()

The constructor.

public __construct(null|float|int $time_1st, null|float|int $time_2nd, array<string|int, File$raChild) : mixed
Parameters
$time_1st : null|float|int

A timestamp

$time_2nd : null|float|int

A timestamp

$raChild : array<string|int, File>

getDataLen()

Returns the amount of data saved for this PPS.

public getDataLen() : int
Return values
int

The amount of data (in bytes)

getPpsWk()

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

public getPpsWk() : string
Return values
string

The binary string

save()

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

public save(resource $fileHandle) : bool

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
$fileHandle : resource

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

Return values
bool

true on success

savePpsSetPnt()

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 static savePpsSetPnt(array<string|int, self> &$raList, mixed $to_save[, int $depth = 0 ]) : int
Parameters
$raList : array<string|int, self>

Reference to the array of PPS's for the whole OLE container

$to_save : mixed
$depth : int = 0
Return values
int

The index for this PPS


        
On this page

Search results