Moodle  2.2.1
http://www.collinsharper.com
OLE Class Reference
Inheritance diagram for OLE:
Collaboration diagram for OLE:

Public Member Functions

 OLE ()
 read ($file)
 _OLE ()
 _readPpsWks ($pps_wk_start, $big_block_size)
 _ppsTreeComplete ($index)
 isFile ($index)
 isRoot ($index)
 ppsTotal ()
 getData ($index, $position, $length)
 getDataLength ($index)

Static Public Member Functions

 Asc2Ucs ($ascii)
 LocalDate2OLE ($date=null)
 OLE2LocalDate ($string)

Data Fields

 $_file_handle
 $_list

Detailed Description

Definition at line 43 of file OLE.php.


Member Function Documentation

_OLE ( )

Destructor (using PEAR) Just closes the file handle on the OLE file.

private

Definition at line 129 of file OLE.php.

_ppsTreeComplete ( index)

It checks whether the PPS tree is complete (all PPS's read) starting with the given PPS (not necessarily root)

private

Parameters:
integer$indexThe index of the PPS from which we are checking
Returns:
boolean Whether the PPS tree for the given PPS is complete

Definition at line 197 of file OLE.php.

Here is the caller graph for this function:

_readPpsWks ( pps_wk_start,
big_block_size 
)

Gets information about all PPS's on the OLE container from the PPS WK's creates an OLE_PPS object for each one.

private

Parameters:
integer$pps_wk_startPosition inside the OLE file where PPS WK's start
integer$big_block_sizeSize of big blobks in the OLE file
Returns:
mixed true on success, PEAR_Error on failure

Definition at line 143 of file OLE.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Asc2Ucs ( ascii) [static]

Utility function to transform ASCII text to Unicode

public

Parameters:
string$asciiThe ASCII string to transform
Returns:
string The string in Unicode

Definition at line 307 of file OLE.php.

Here is the caller graph for this function:

getData ( index,
position,
length 
)

Gets data from a PPS If there is no PPS for the index given, it will return an empty string.

public

Parameters:
integer$indexThe index for the PPS
integer$positionThe position from which to start reading (relative to the PPS)
integer$lengthThe amount of bytes to read (at most)
Returns:
string The binary string containing the data requested

Definition at line 272 of file OLE.php.

getDataLength ( index)

Gets the data length from a PPS If there is no PPS for the index given, it will return 0.

public

Parameters:
integer$indexThe index for the PPS
Returns:
integer The amount of bytes in data the PPS has

Definition at line 291 of file OLE.php.

isFile ( index)

Checks whether a PPS is a File PPS or not. If there is no PPS for the index given, it will return false.

public

Parameters:
integer$indexThe index for the PPS
Returns:
bool true if it's a File PPS, false otherwise

Definition at line 226 of file OLE.php.

isRoot ( index)

Checks whether a PPS is a Root PPS or not. If there is no PPS for the index given, it will return false.

public

Parameters:
integer$indexThe index for the PPS.
Returns:
bool true if it's a Root PPS, false otherwise

Definition at line 242 of file OLE.php.

LocalDate2OLE ( date = null) [static]

Utility function Returns a string for the OLE container with the date given

public

Parameters:
integer$dateA timestamp
Returns:
string The string for the OLE container

Definition at line 325 of file OLE.php.

Here is the caller graph for this function:

OLE ( )

Creates a new OLE object Remember to use ampersand when creating an OLE object ($my_ole =& new OLE();) public

Definition at line 62 of file OLE.php.

OLE2LocalDate ( string) [static]

Returns a timestamp from an OLE container's date

public

Parameters:
integer$stringA binary string with the encoded date
Returns:
string The timestamp corresponding to the string

Definition at line 372 of file OLE.php.

Here is the caller graph for this function:

ppsTotal ( )

Gives the total number of PPS's found in the OLE container.

public

Returns:
integer The total number of PPS's found in the OLE container

Definition at line 256 of file OLE.php.

read ( file)

Reads an OLE container from the contents of the file given.

public

Parameters:
string$file
Returns:
mixed true on success, PEAR_Error on failure

Definition at line 74 of file OLE.php.

Here is the call graph for this function:


Field Documentation

$_file_handle

Definition at line 49 of file OLE.php.

$_list

Definition at line 55 of file OLE.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations