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

Class: PHPExcel_Shared_OLE

Source Location: /PHPExcel/Shared/OLE.php

Class Overview


OLE package base class.


Author(s):

Variables

Constants

Methods



Class Details

[line 43]
OLE package base class.

OLE package base class.




Tags:

author:  Xavier Noguer <xnoguer@php.net>
author:  Christian Schmidt <schmidt@php.net>


[ Top ]


Class Variables

$bbat =

[line 74]

Big Block Allocation Table

Big Block Allocation Table




Tags:

var:  (blockId => nextBlockId)
access:  public

Type:   array


[ Top ]

$bigBlockSize =

[line 86]

Size of big blocks.

Size of big blocks. This is usually 512.




Tags:

var:  number of octets per block.
access:  public

Type:   int


[ Top ]

$root =

[line 68]

Root directory of OLE container

Root directory of OLE container




Tags:

access:  public

Type:   OLE_PPS_Root


[ Top ]

$sbat =

[line 80]

Short Block Allocation Table

Short Block Allocation Table




Tags:

var:  (blockId => nextBlockId)
access:  public

Type:   array


[ Top ]

$smallBlockSize =

[line 92]

Size of small blocks.

Size of small blocks. This is usually 64.




Tags:

var:  number of octets per block
access:  public

Type:   int


[ Top ]

$_file_handle =

[line 56]

The file handle for reading an OLE container

The file handle for reading an OLE container




Tags:

access:  public

Type:   resource


[ Top ]

$_list = array()

[line 62]

Array of PPS's found on the OLE container

Array of PPS's found on the OLE container




Tags:

access:  public

Type:   array


[ Top ]



Class Methods


static method Asc2Ucs [line 451]

static string Asc2Ucs( string $ascii)

Utility function to transform ASCII text to Unicode

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 469]

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

Utility function

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 514]

static string OLE2LocalDate( integer $string)

Returns a timestamp from an OLE container's date

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 ]

method getData [line 415]

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.

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 435]

integer getDataLength( integer $index)

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

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 202]

resource getStream( int|PPS $blockIdOrPps)

Returns a stream for use with fread() etc. use PHPExcel_Shared_OLE_PPS_File::getStream().

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




Tags:

return:  read-only stream
access:  public


Parameters:

int|PPS   $blockIdOrPps   block id or PPS

[ Top ]

method isFile [line 368]

bool isFile( integer $index)

Checks whether a PPS is a File PPS or not.

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 384]

bool isRoot( integer $index)

Checks whether a PPS is a Root PPS or not.

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 398]

integer ppsTotal( )

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

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 101]

mixed read( string $file)

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

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 191]

void _getBlockOffset( int $blockId, int 1)



Tags:

access:  public


Parameters:

int   1   byte offset from beginning of file
int   $blockId   block id

[ Top ]

method _ppsTreeComplete [line 348]

boolean _ppsTreeComplete( integer $index)

It checks whether the PPS tree is complete (all PPS's read)

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:  public


Parameters:

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

[ Top ]

method _readInt1 [line 233]

int _readInt1( resource $fh)

Reads a signed char.

Reads a signed char.




Tags:

access:  public


Parameters:

resource   $fh   file handle

[ Top ]

method _readInt2 [line 245]

int _readInt2( resource $fh)

Reads an unsigned short (2 octets).

Reads an unsigned short (2 octets).




Tags:

access:  public


Parameters:

resource   $fh   file handle

[ Top ]

method _readInt4 [line 257]

int _readInt4( resource $fh)

Reads an unsigned long (4 octets).

Reads an unsigned long (4 octets).




Tags:

access:  public


Parameters:

resource   $fh   file handle

[ Top ]

method _readPpsWks [line 271]

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.

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:  public


Parameters:

integer   $blockId   the block id of the first block

[ Top ]


Class Constants

OLE_DATA_SIZE_SMALL =  0x1000

[line 48]


[ Top ]

OLE_LONG_INT_SIZE =       4

[line 49]


[ Top ]

OLE_PPS_SIZE =    0x80

[line 50]


[ Top ]

OLE_PPS_TYPE_DIR =       1

[line 46]


[ Top ]

OLE_PPS_TYPE_FILE =       2

[line 47]


[ Top ]

OLE_PPS_TYPE_ROOT =       5

[line 45]


[ Top ]



Documentation generated on Mon, 05 Jan 2009 20:38:09 +0100 by phpDocumentor 1.4.1