MediaWiki REL1_33
|
Read the directory of a Microsoft Compound File Binary file, a.k.a. More...
Static Public Member Functions | |
static | readFile ( $fileName) |
Read a file by name. | |
static | readHandle ( $fileHandle) |
Read from an open seekable handle. | |
Public Attributes | |
const | ERROR_FILE_OPEN = 1 |
const | ERROR_INVALID_FORMAT = 6 |
const | ERROR_INVALID_SIGNATURE = 4 |
const | ERROR_READ = 3 |
const | ERROR_READ_PAST_END = 5 |
const | ERROR_SEEK = 2 |
const | TYPE_ROOT = 5 |
const | TYPE_STORAGE = 1 |
const | TYPE_STREAM = 2 |
const | TYPE_UNALLOCATED = 0 |
Private Member Functions | |
__construct ( $fileHandle) | |
bin2dec ( $str, $offset, $length) | |
decodeClsid ( $binaryClsid) | |
error ( $message, $code) | |
fseek ( $offset) | |
getFatSector ( $fatSectorId) | |
getNextSectorIdFromFat ( $sectorId) | |
init () | |
readDifat () | |
readDirectory () | |
readOffset ( $offset, $length) | |
readSector ( $sectorId) | |
sectorOffset ( $sectorId) | |
unpack ( $block, $offset, $struct) | |
unpackOffset ( $offset, $struct) | |
unpackSector ( $sectorNumber, $struct) | |
Private Attributes | |
$difat | |
$error | |
$errorCode | |
$fat = [] | |
$file | |
$fileLength | |
$header | |
$mime | |
$mimeFromClsid | |
$sectorLength | |
$valid = false | |
Static Private Attributes | |
static | $mimesByClsid |
Read the directory of a Microsoft Compound File Binary file, a.k.a.
an OLE file, and detect the MIME type.
References:
Definition at line 32 of file MSCompoundFileReader.php.
|
private |
Definition at line 116 of file MSCompoundFileReader.php.
References $e, $fileHandle, and init().
|
private |
Definition at line 203 of file MSCompoundFileReader.php.
Referenced by getFatSector(), readDifat(), and unpack().
|
private |
Definition at line 163 of file MSCompoundFileReader.php.
References and(), and unpack().
Referenced by readDirectory().
|
private |
Definition at line 231 of file MSCompoundFileReader.php.
References $code.
|
private |
Definition at line 235 of file MSCompoundFileReader.php.
References and(), error, and fseek().
Referenced by fseek(), and readOffset().
|
private |
Definition at line 274 of file MSCompoundFileReader.php.
References $fat, and(), bin2dec(), error, and readSector().
Referenced by getNextSectorIdFromFat().
|
private |
Definition at line 267 of file MSCompoundFileReader.php.
References and(), and getFatSector().
Referenced by readDirectory().
|
private |
Definition at line 127 of file MSCompoundFileReader.php.
References and(), error, readDifat(), readDirectory(), and unpackOffset().
Referenced by __construct().
|
private |
Definition at line 244 of file MSCompoundFileReader.php.
References and(), bin2dec(), and readSector().
Referenced by init().
|
private |
Definition at line 290 of file MSCompoundFileReader.php.
References $type, and(), decodeClsid(), error, getNextSectorIdFromFat(), readSector(), and unpack().
Referenced by init().
|
static |
Read a file by name.
string | $fileName | The full path to the file |
Definition at line 78 of file MSCompoundFileReader.php.
References and(), ERROR_FILE_OPEN, and readHandle().
Referenced by MSCompoundFileReaderTest\testReadFile(), and MSCompoundFileReaderTest\testReadFileInvalid().
|
static |
Read from an open seekable handle.
resource | $fileHandle | The file handle |
Definition at line 102 of file MSCompoundFileReader.php.
References $fileHandle.
Referenced by readFile().
|
private |
Definition at line 212 of file MSCompoundFileReader.php.
References and(), error, and fseek().
Referenced by readSector(), and unpackOffset().
|
private |
Definition at line 227 of file MSCompoundFileReader.php.
References readOffset(), and sectorOffset().
Referenced by getFatSector(), readDifat(), and readDirectory().
|
private |
Definition at line 159 of file MSCompoundFileReader.php.
Referenced by readSector(), and unpackSector().
|
private |
Definition at line 190 of file MSCompoundFileReader.php.
References $data, and(), and bin2dec().
Referenced by decodeClsid(), readDirectory(), and unpackOffset().
|
private |
Definition at line 180 of file MSCompoundFileReader.php.
References and(), readOffset(), and unpack().
Referenced by init(), and unpackSector().
|
private |
Definition at line 185 of file MSCompoundFileReader.php.
References and(), sectorOffset(), and unpackOffset().
|
private |
Definition at line 42 of file MSCompoundFileReader.php.
|
private |
Definition at line 37 of file MSCompoundFileReader.php.
|
private |
Definition at line 38 of file MSCompoundFileReader.php.
|
private |
Definition at line 43 of file MSCompoundFileReader.php.
Referenced by getFatSector().
|
private |
Definition at line 33 of file MSCompoundFileReader.php.
|
private |
Definition at line 44 of file MSCompoundFileReader.php.
|
private |
Definition at line 34 of file MSCompoundFileReader.php.
|
private |
Definition at line 35 of file MSCompoundFileReader.php.
|
private |
Definition at line 36 of file MSCompoundFileReader.php.
|
staticprivate |
Definition at line 58 of file MSCompoundFileReader.php.
|
private |
Definition at line 41 of file MSCompoundFileReader.php.
|
private |
Definition at line 39 of file MSCompoundFileReader.php.
const MSCompoundFileReader::ERROR_FILE_OPEN = 1 |
Definition at line 51 of file MSCompoundFileReader.php.
Referenced by readFile().
const MSCompoundFileReader::ERROR_INVALID_FORMAT = 6 |
Definition at line 56 of file MSCompoundFileReader.php.
const MSCompoundFileReader::ERROR_INVALID_SIGNATURE = 4 |
Definition at line 54 of file MSCompoundFileReader.php.
const MSCompoundFileReader::ERROR_READ = 3 |
Definition at line 53 of file MSCompoundFileReader.php.
const MSCompoundFileReader::ERROR_READ_PAST_END = 5 |
Definition at line 55 of file MSCompoundFileReader.php.
const MSCompoundFileReader::ERROR_SEEK = 2 |
Definition at line 52 of file MSCompoundFileReader.php.
const MSCompoundFileReader::TYPE_ROOT = 5 |
Definition at line 49 of file MSCompoundFileReader.php.
const MSCompoundFileReader::TYPE_STORAGE = 1 |
Definition at line 47 of file MSCompoundFileReader.php.
const MSCompoundFileReader::TYPE_STREAM = 2 |
Definition at line 48 of file MSCompoundFileReader.php.
const MSCompoundFileReader::TYPE_UNALLOCATED = 0 |
Definition at line 46 of file MSCompoundFileReader.php.