[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_ext/PEAR/OLE/ -> OLE.php (summary)

Constants for OLE package

File Size: 410 lines (14 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

OLE:: (13 methods):
  OLE()
  read()
  _OLE()
  _readPpsWks()
  _ppsTreeComplete()
  isFile()
  isRoot()
  ppsTotal()
  getData()
  getDataLength()
  Asc2Ucs()
  LocalDate2OLE()
  OLE2LocalDate()


Class: OLE  - X-Ref

OLE package base class.

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


read($file)   X-Ref
Reads an OLE container from the contents of the file given.

param: string $file
return: mixed true on success, PEAR_Error on failure

_OLE()   X-Ref
Destructor (using PEAR)
Just closes the file handle on the OLE file.


_readPpsWks($pps_wk_start, $big_block_size)   X-Ref
Gets information about all PPS's on the OLE container from the PPS WK's
creates an OLE_PPS object for each one.

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

_ppsTreeComplete($index)   X-Ref
It checks whether the PPS tree is complete (all PPS's read)
starting with the given PPS (not necessarily root)

param: integer $index The index of the PPS from which we are checking
return: boolean Whether the PPS tree for the given PPS is complete

isFile($index)   X-Ref
Checks whether a PPS is a File PPS or not.
If there is no PPS for the index given, it will return false.

param: integer $index The index for the PPS
return: bool true if it's a File PPS, false otherwise

isRoot($index)   X-Ref
Checks whether a PPS is a Root PPS or not.
If there is no PPS for the index given, it will return false.

param: integer $index The index for the PPS.
return: bool true if it's a Root PPS, false otherwise

ppsTotal()   X-Ref
Gives the total number of PPS's found in the OLE container.

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

getData($index, $position, $length)   X-Ref
Gets data from a PPS
If there is no PPS for the index given, it will return an empty string.

param: integer $index    The index for the PPS
param: integer $position The position from which to start reading
param: integer $length   The amount of bytes to read (at most)
return: string The binary string containing the data requested

getDataLength($index)   X-Ref
Gets the data length from a PPS
If there is no PPS for the index given, it will return 0.

param: integer $index    The index for the PPS
return: integer The amount of bytes in data the PPS has

Asc2Ucs($ascii)   X-Ref
Utility function to transform ASCII text to Unicode

param: string $ascii The ASCII string to transform
return: string The string in Unicode

LocalDate2OLE($date = null)   X-Ref
Utility function
Returns a string for the OLE container with the date given

param: integer $date A timestamp
return: string The string for the OLE container

OLE2LocalDate($string)   X-Ref
Returns a timestamp from an OLE container's date

param: integer $string A binary string with the encoded date
return: string The timestamp corresponding to the string



Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7