Class OLE

Description

OLE package base class.

Located in /libraries/pear/OLE/OLE.php (line 43)

PEAR
   |
   --OLE
Variable Summary
 resource $_file_handle
 array $_list
Method Summary
 OLE OLE ()
 string Asc2Ucs (string $ascii)
 string getData (integer $index, integer $position, integer $length)
 integer getDataLength (integer $index)
 bool isFile (integer $index)
 bool isRoot (integer $index)
 string LocalDate2OLE ([integer $date = null])
 string OLE2LocalDate (integer $string)
 integer ppsTotal ()
 mixed read (string $file)
 void _OLE ()
 boolean _ppsTreeComplete (integer $index)
 mixed _readPpsWks (integer $pps_wk_start, integer $big_block_size)
Variables
resource $_file_handle (line 49)

The file handle for reading an OLE container

array $_list (line 55)

Array of PPS's found on the OLE container

Methods
Constructor OLE (line 62)

Creates a new OLE object

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

  • access: public
OLE OLE ()
Asc2Ucs (line 307)

Utility function to transform ASCII text to Unicode

  • return: The string in Unicode
  • static:
  • access: public
string Asc2Ucs (string $ascii)
  • string $ascii: The ASCII string to transform
getData (line 272)

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

  • return: The binary string containing the data requested
  • access: public
string getData (integer $index, integer $position, integer $length)
  • integer $index: The index for the PPS
  • integer $position: The position from which to start reading (relative to the PPS)
  • integer $length: The amount of bytes to read (at most)
getDataLength (line 291)

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

  • return: The amount of bytes in data the PPS has
  • access: public
integer getDataLength (integer $index)
  • integer $index: The index for the PPS
isFile (line 226)

Checks whether a PPS is a File PPS or not.

If there is no PPS for the index given, it will return false.

  • return: true if it's a File PPS, false otherwise
  • access: public
bool isFile (integer $index)
  • integer $index: The index for the PPS
isRoot (line 242)

Checks whether a PPS is a Root PPS or not.

If there is no PPS for the index given, it will return false.

  • return: true if it's a Root PPS, false otherwise
  • access: public
bool isRoot (integer $index)
  • integer $index: The index for the PPS.
LocalDate2OLE (line 325)

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

  • return: The string for the OLE container
  • static:
  • access: public
string LocalDate2OLE ([integer $date = null])
  • integer $date: A timestamp
OLE2LocalDate (line 372)

Returns a timestamp from an OLE container's date

  • return: The timestamp corresponding to the string
  • static:
  • access: public
string OLE2LocalDate (integer $string)
  • integer $string: A binary string with the encoded date
ppsTotal (line 256)

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

  • return: The total number of PPS's found in the OLE container
  • access: public
integer ppsTotal ()
read (line 74)

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

  • return: true on success, PEAR_Error on failure
mixed read (string $file)
  • string $file
_OLE (line 129)

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

  • access: private
void _OLE ()
_ppsTreeComplete (line 197)

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

  • return: Whether the PPS tree for the given PPS is complete
  • access: private
boolean _ppsTreeComplete (integer $index)
  • integer $index: The index of the PPS from which we are checking
_readPpsWks (line 143)

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

  • return: true on success, PEAR_Error on failure
  • access: private
mixed _readPpsWks (integer $pps_wk_start, integer $big_block_size)
  • integer $pps_wk_start: Position inside the OLE file where PPS WK's start
  • integer $big_block_size: Size of big blobks in the OLE file

Documentation generated on Fri, 11 Feb 2005 18:13:41 +0000 by phpDocumentor 1.3.0RC3