OLE
[ class tree: OLE ] [ index: OLE ] [ all elements ]

Class: OLE

Source Location: /main/inc/lib/pear/OLE/OLE.php

Class Overview

PEAR
   |
   --OLE

OLE package base class.


Author(s):

Version:

  • Release: 1.4.11

Copyright:

  • 1997-2006 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods

Class: PEAR

PEAR::PEAR()
Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.
PEAR::delExpect()
This method deletes all occurences of the specified element from the expected error codes stack.
PEAR::expectError()
This method is used to tell which errors you expect to get.
PEAR::getStaticProperty()
If you have a class that's mostly/entirely static, and you need static
PEAR::isError()
Tell whether a value is a PEAR error.
PEAR::loadExtension()
OS independant PHP extension load. Remember to take care on the correct extension name for case sensitive OSes.
PEAR::popErrorHandling()
Pop the last error handler used
PEAR::popExpect()
This method pops one element off the expected error codes stack.
PEAR::pushErrorHandling()
Push a new error handler on top of the error handler options stack. With this you can easily override the actual error handler for some code and restore it later with popErrorHandling.
PEAR::raiseError()
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. If the $mode and $options parameters are not specified, the object's defaults are used.
PEAR::registerShutdownFunc()
Use this function to register a shutdown method for static classes.
PEAR::setErrorHandling()
Sets how errors generated by this object should be handled.
PEAR::staticPopErrorHandling()
PEAR::staticPushErrorHandling()
PEAR::throwError()
Simpler form of raiseError with fewer options. In most cases message, code and userinfo are enough.
PEAR::_checkDelExpect()
This method checks unsets an error code if available
PEAR::_PEAR()
Destructor (the emulated type of...). Does nothing right now, but is included for forward compatibility, so subclass destructors should always call it.

Class Details

[line 50]
OLE package base class.



Tags:

author:  Christian Schmidt <schmidt@php.net>
author:  Xavier Noguer <xnoguer@php.net>
version:  Release: 1.4.11
copyright:  1997-2006 The PHP Group


[ Top ]


Class Variables

$bbat =

[line 75]

Big Block Allocation Table



Tags:

var:  (blockId => nextBlockId)

Type:   array


[ Top ]

$bigBlockSize =

[line 87]

Size of big blocks. This is usually 512.



Tags:

var:  number of octets per block.

Type:   int


[ Top ]

$root =

[line 69]

Root directory of OLE container


Type:   OLE_PPS_Root


[ Top ]

$sbat =

[line 81]

Short Block Allocation Table



Tags:

var:  (blockId => nextBlockId)

Type:   array


[ Top ]

$smallBlockSize =

[line 93]

Size of small blocks. This is usually 64.



Tags:

var:  number of octets per block

Type:   int


[ Top ]

$_file_handle =

[line 57]

The file handle for reading an OLE container


Type:   resource


[ Top ]

$_list =

[line 63]

Array of PPS's found on the OLE container


Type:   array


[ Top ]



Class Methods


static method Asc2Ucs [line 473]

static string Asc2Ucs( string $ascii)

Utility function to transform ASCII text to Unicode



Tags:

return:  The string in Unicode
access:  public


Parameters:

string   $ascii   The ASCII string to transform

[ Top ]

static method LocalDate2OLE [line 491]

static string LocalDate2OLE( [integer $date = null])

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



Tags:

return:  The string for the OLE container
access:  public


Parameters:

integer   $date   A timestamp

[ Top ]

static method OLE2LocalDate [line 536]

static string OLE2LocalDate( integer $string)

Returns a timestamp from an OLE container's date



Tags:

return:  The timestamp corresponding to the string
access:  public


Parameters:

integer   $string   A binary string with the encoded date

[ Top ]

constructor OLE [line 99]

OLE OLE( )

Creates a new OLE object



Tags:

access:  public


[ Top ]

method getData [line 435]

string getData( integer $index, integer $position, integer $length)

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



Tags:

return:  The binary string containing the data requested
see:  OLE_PPS_File::getStream()
access:  public


Parameters:

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)

[ Top ]

method getDataLength [line 457]

integer getDataLength( integer $index)

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



Tags:

return:  The amount of bytes in data the PPS has
access:  public


Parameters:

integer   $index   The index for the PPS

[ Top ]

method getStream [line 223]

resource getStream( int|PPS $blockIdOrPps)

Returns a stream for use with fread() etc. External callers should use OLE_PPS_File::getStream().



Tags:

return:  read-only stream


Parameters:

int|PPS   $blockIdOrPps   block id or PPS

[ Top ]

method isFile [line 391]

bool isFile( integer $index)

Checks whether a PPS is a File PPS or not.

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




Tags:

return:  true if it's a File PPS, false otherwise
access:  public


Parameters:

integer   $index   The index for the PPS

[ Top ]

method isRoot [line 406]

bool isRoot( integer $index)

Checks whether a PPS is a Root PPS or not.

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




Tags:

return:  true if it's a Root PPS, false otherwise
access:  public


Parameters:

integer   $index   The index for the PPS.

[ Top ]

method ppsTotal [line 419]

integer ppsTotal( )

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



Tags:

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


[ Top ]

method read [line 122]

mixed read( string $file)

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



Tags:

return:  true on success, PEAR_Error on failure
access:  public


Parameters:

string   $file  

[ Top ]

method _getBlockOffset [line 212]

int _getBlockOffset( int $blockId)



Tags:

return:  byte offset from beginning of file
access:  private


Parameters:

int   $blockId   block id

[ Top ]

method _OLE [line 110]

void _OLE( )

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



Tags:

access:  private


[ Top ]

method _ppsTreeComplete [line 372]

boolean _ppsTreeComplete( integer $index)

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



Tags:

return:  Whether the PPS tree for the given PPS is complete
access:  private


Parameters:

integer   $index   The index of the PPS from which we are checking

[ Top ]

method _readInt1 [line 255]

int _readInt1( resource $fh)

Reads a signed char.



Tags:

access:  private


Parameters:

resource   $fh   file handle

[ Top ]

method _readInt2 [line 267]

int _readInt2( resource $fh)

Reads an unsigned short (2 octets).



Tags:

access:  private


Parameters:

resource   $fh   file handle

[ Top ]

method _readInt4 [line 279]

int _readInt4( resource $fh)

Reads an unsigned long (4 octets).



Tags:

access:  private


Parameters:

resource   $fh   file handle

[ Top ]

method _readPpsWks [line 293]

mixed _readPpsWks( integer $blockId)

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



Tags:

return:  true on success, PEAR_Error on failure
access:  private


Parameters:

integer   $blockId   the block id of the first block

[ Top ]


Documentation generated on Thu, 12 Jun 2008 14:08:04 -0500 by phpDocumentor 1.4.1