ILIAS
Release_4_2_x_branch Revision 61807
|
Public Member Functions | |
OLE () | |
Creates a new OLE object Remember to use ampersand when creating an OLE object ($my_ole =& new OLE();) public. | |
read ($file) | |
Reads an OLE container from the contents of the file given. | |
_OLE () | |
Destructor (using PEAR) Just closes the file handle on the OLE file. | |
_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. | |
_ppsTreeComplete ($index) | |
It checks whether the PPS tree is complete (all PPS's read) starting with the given PPS (not necessarily root) | |
isFile ($index) | |
Checks whether a PPS is a File PPS or not. | |
isRoot ($index) | |
Checks whether a PPS is a Root PPS or not. | |
ppsTotal () | |
Gives the total number of PPS's found in the OLE container. | |
getData ($index, $position, $length) | |
Gets data from a PPS If there is no PPS for the index given, it will return an empty string. | |
getDataLength ($index) | |
Gets the data length from a PPS If there is no PPS for the index given, it will return 0. | |
OLE () | |
Creates a new OLE object public. | |
_OLE () | |
Destructor (using PEAR) Just closes the file handle on the OLE file. | |
read ($file) | |
Reads an OLE container from the contents of the file given. | |
_getBlockOffset ($blockId) | |
getStream ($blockIdOrPps) | |
Returns a stream for use with fread() etc. | |
_readInt1 ($fh) | |
Reads a signed char. | |
_readInt2 ($fh) | |
Reads an unsigned short (2 octets). | |
_readInt4 ($fh) | |
Reads an unsigned long (4 octets). | |
_readPpsWks ($blockId) | |
Gets information about all PPS's on the OLE container from the PPS WK's creates an OLE_PPS object for each one. | |
_ppsTreeComplete ($index) | |
It checks whether the PPS tree is complete (all PPS's read) starting with the given PPS (not necessarily root) | |
isFile ($index) | |
Checks whether a PPS is a File PPS or not. | |
isRoot ($index) | |
Checks whether a PPS is a Root PPS or not. | |
ppsTotal () | |
Gives the total number of PPS's found in the OLE container. | |
getData ($index, $position, $length) | |
Gets data from a PPS If there is no PPS for the index given, it will return an empty string. | |
getDataLength ($index) | |
Gets the data length from a PPS If there is no PPS for the index given, it will return 0. | |
Public Member Functions inherited from PEAR | |
PEAR ($error_class=null) | |
Constructor. | |
_PEAR () | |
Destructor (the emulated type of...). | |
& | getStaticProperty ($class, $var) |
If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. | |
registerShutdownFunc ($func, $args=array()) | |
Use this function to register a shutdown method for static classes. | |
isError ($data, $code=null) | |
Tell whether a value is a PEAR error. | |
setErrorHandling ($mode=null, $options=null) | |
Sets how errors generated by this object should be handled. | |
expectError ($code= '*') | |
This method is used to tell which errors you expect to get. | |
popExpect () | |
This method pops one element off the expected error codes stack. | |
_checkDelExpect ($error_code) | |
This method checks unsets an error code if available. | |
delExpect ($error_code) | |
This method deletes all occurences of the specified element from the expected error codes stack. | |
& | raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false) |
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. | |
& | throwError ($message=null, $code=null, $userinfo=null) |
Simpler form of raiseError with fewer options. | |
staticPushErrorHandling ($mode, $options=null) | |
staticPopErrorHandling () | |
pushErrorHandling ($mode, $options=null) | |
Push a new error handler on top of the error handler options stack. | |
popErrorHandling () | |
Pop the last error handler used. | |
loadExtension ($ext) | |
OS independant PHP extension load. |
Static Public Member Functions | |
Asc2Ucs ($ascii) | |
Utility function to transform ASCII text to Unicode. | |
LocalDate2OLE ($date=null) | |
Utility function Returns a string for the OLE container with the date given. | |
OLE2LocalDate ($string) | |
Returns a timestamp from an OLE container's date. | |
Asc2Ucs ($ascii) | |
Utility function to transform ASCII text to Unicode. | |
LocalDate2OLE ($date=null) | |
Utility function Returns a string for the OLE container with the date given. | |
OLE2LocalDate ($string) | |
Returns a timestamp from an OLE container's date. |
Data Fields | |
$_file_handle | |
$_list | |
$root | |
$bbat | |
$sbat | |
$bigBlockSize | |
$smallBlockSize | |
Data Fields inherited from PEAR | |
$_debug = false | |
$_default_error_mode = null | |
$_default_error_options = null | |
$_default_error_handler = '' | |
$_error_class = 'PEAR_Error' | |
$_expected_errors = array() |
OLE::_getBlockOffset | ( | $blockId | ) |
int | $blockId | block id |
Definition at line 212 of file OLE.php.
References $bigBlockSize.
Referenced by read().
OLE::_OLE | ( | ) |
OLE::_OLE | ( | ) |
OLE::_ppsTreeComplete | ( | $index | ) |
It checks whether the PPS tree is complete (all PPS's read) starting with the given PPS (not necessarily root)
private
integer | $index | The index of the PPS from which we are checking |
Definition at line 197 of file OLE.php.
Referenced by _readPpsWks().
OLE::_ppsTreeComplete | ( | $index | ) |
It checks whether the PPS tree is complete (all PPS's read) starting with the given PPS (not necessarily root)
private
integer | $index | The index of the PPS from which we are checking |
Definition at line 372 of file OLE.php.
OLE::_readInt1 | ( | $fh | ) |
Reads a signed char.
resource | $fh | file handle |
Definition at line 255 of file OLE.php.
Referenced by _readPpsWks().
OLE::_readInt2 | ( | $fh | ) |
Reads an unsigned short (2 octets).
resource | $fh | file handle |
Definition at line 267 of file OLE.php.
Referenced by _readPpsWks(), and read().
OLE::_readInt4 | ( | $fh | ) |
Reads an unsigned long (4 octets).
resource | file handle |
Definition at line 279 of file OLE.php.
Referenced by _readPpsWks(), and read().
OLE::_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
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 |
Definition at line 143 of file OLE.php.
References $dir, $size, _ppsTreeComplete(), OLE2LocalDate(), OLE_PPS_SIZE, OLE_PPS_TYPE_DIR, OLE_PPS_TYPE_FILE, OLE_PPS_TYPE_ROOT, and PEAR\raiseError().
Referenced by read().
OLE::_readPpsWks | ( | $blockId | ) |
Gets information about all PPS's on the OLE container from the PPS WK's creates an OLE_PPS object for each one.
private
integer | $blockId | the block id of the first block |
Definition at line 293 of file OLE.php.
References _ppsTreeComplete(), _readInt1(), _readInt2(), _readInt4(), getStream(), OLE2LocalDate(), OLE_PPS_TYPE_DIR, OLE_PPS_TYPE_FILE, and OLE_PPS_TYPE_ROOT.
|
static |
Utility function to transform ASCII text to Unicode.
public
string | $ascii | The ASCII string to transform |
Definition at line 307 of file OLE.php.
Referenced by Spreadsheet_Excel_Writer_Workbook\_storeOLEFile(), and OLE_PPS_Root\OLE_PPS_Root().
|
static |
Utility function to transform ASCII text to Unicode.
public
string | $ascii | The ASCII string to transform |
Definition at line 473 of file OLE.php.
OLE::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
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) |
Definition at line 272 of file OLE.php.
OLE::getData | ( | $index, | |
$position, | |||
$length | |||
) |
Gets data from a PPS If there is no PPS for the index given, it will return an empty string.
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) |
Definition at line 435 of file OLE.php.
References $data, and getStream().
OLE::getDataLength | ( | $index | ) |
Gets the data length from a PPS If there is no PPS for the index given, it will return 0.
public
integer | $index | The index for the PPS |
Definition at line 291 of file OLE.php.
OLE::getDataLength | ( | $index | ) |
Gets the data length from a PPS If there is no PPS for the index given, it will return 0.
integer | $index | The index for the PPS |
Definition at line 457 of file OLE.php.
OLE::getStream | ( | $blockIdOrPps | ) |
Returns a stream for use with fread() etc.
External callers should use OLE_PPS_File::getStream().
int | PPS | $blockIdOrPps | block id or PPS |
Definition at line 223 of file OLE.php.
References $GLOBALS, and $path.
Referenced by _readPpsWks(), getData(), and read().
OLE::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
integer | $index | The index for the PPS |
Definition at line 226 of file OLE.php.
References OLE_PPS_TYPE_FILE.
OLE::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.
integer | $index | The index for the PPS |
Definition at line 391 of file OLE.php.
References OLE_PPS_TYPE_FILE.
OLE::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
integer | $index | The index for the PPS. |
Definition at line 242 of file OLE.php.
References OLE_PPS_TYPE_ROOT.
OLE::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.
integer | $index | The index for the PPS. |
Definition at line 406 of file OLE.php.
References OLE_PPS_TYPE_ROOT.
|
static |
Utility function Returns a string for the OLE container with the date given.
public
integer | $date | A timestamp |
Definition at line 325 of file OLE.php.
References $res.
Referenced by OLE_PPS\_getPpsWk().
|
static |
Utility function Returns a string for the OLE container with the date given.
public
integer | $date | A timestamp |
Definition at line 491 of file OLE.php.
References $res.
OLE::OLE | ( | ) |
OLE::OLE | ( | ) |
|
static |
Returns a timestamp from an OLE container's date.
public
integer | $string | A binary string with the encoded date |
Definition at line 372 of file OLE.php.
Referenced by _readPpsWks().
|
static |
Returns a timestamp from an OLE container's date.
integer | $string | A binary string with the encoded date |
Definition at line 536 of file OLE.php.
OLE::ppsTotal | ( | ) |
OLE::ppsTotal | ( | ) |
OLE::read | ( | $file | ) |
Reads an OLE container from the contents of the file given.
public
string | $file |
Definition at line 74 of file OLE.php.
References $file, $ret, _readPpsWks(), PEAR\isError(), OLE_LONG_INT_SIZE, and PEAR\raiseError().
OLE::read | ( | $file | ) |
Reads an OLE container from the contents of the file given.
public
string | $file |
Definition at line 122 of file OLE.php.
References $file, _getBlockOffset(), _readInt2(), _readInt4(), _readPpsWks(), getStream(), and PEAR\raiseError().
OLE::$bigBlockSize |
Definition at line 87 of file OLE.php.
Referenced by _getBlockOffset().