Zend Framework
1.12
|
Public Member Functions | |
__construct ($filePath) | |
Object constructor. | |
__destruct () | |
Object destructor. | |
readBytes ($byteCount) | |
Returns the specified number of raw bytes from the file at the byte offset of the current read position. | |
readAllBytes () | |
Returns the entire contents of the file as a string. | |
__toString () | |
Returns the full filesystem path of the file. | |
moveToOffset ($offset) | |
Seeks the file read position to the specified byte offset. | |
![]() | |
__destruct () | |
Object destructor. | |
readBytes ($byteCount) | |
Returns the specified number of raw bytes from the data source at the byte offset of the current read position. | |
readAllBytes () | |
Returns the entire contents of the data source as a string. | |
__toString () | |
Returns a description of the object for debugging purposes. | |
getOffset () | |
Returns the byte offset of the current read position within the data source. | |
getSize () | |
Returns the total size in bytes of the data source. | |
moveToOffset ($offset) | |
Moves the current read position to the specified byte offset. | |
skipBytes ($byteCount) | |
Shifts the current read position within the data source by the specified number of bytes. | |
Protected Attributes | |
$_filePath = '' | |
$_fileResource = null | |
![]() | |
$_size = 0 | |
$_offset = 0 | |
__construct | ( | $filePath | ) |
Object constructor.
Validates the path to the file, ensures that it is readable, then opens it for reading.
Throws an exception if the file is missing or cannot be opened.
string | $filePath | Fully-qualified path to the file. |
Zend_Pdf_Exception |
__destruct | ( | ) |
Object destructor.
Closes the file if it had been successfully opened.
__toString | ( | ) |
Returns the full filesystem path of the file.
moveToOffset | ( | $offset | ) |
Seeks the file read position to the specified byte offset.
Throws an exception if the file pointer cannot be moved or if it is moved beyond EOF (end of file).
integer | $offset | Destination byte offset. |
Zend_Pdf_Exception |
readAllBytes | ( | ) |
Returns the entire contents of the file as a string.
Preserves the current file seek position.
readBytes | ( | $byteCount | ) |
Returns the specified number of raw bytes from the file at the byte offset of the current read position.
Advances the read position by the number of bytes read.
Throws an exception if an error was encountered while reading the file or if there is insufficient data to completely fulfill the request.
integer | $byteCount | Number of bytes to read. |
Zend_Pdf_Exception |
|
protected |
|
protected |