Concrete subclass of {@link Zend_Pdf_FileParserDataSource} that provides an interface to filesystem objects.
Note that this class cannot be used for other sources that may be supported by \fopen() (through URL wrappers). It may be used for local filesystem objects only.
package | Zend_Pdf |
---|---|
subpackage | FileParser |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Pdf_FileParserDataSource |
__construct(string $filePath)
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
Fully-qualified path to the file.
\Zend_Pdf_Exception |
---|
__destruct()
Closes the file if it had been successfully opened.
inherited_from | \Zend_Pdf_FileParserDataSource::__destruct() |
---|
__destruct()
May also perform cleanup tasks such as deleting temporary files.
__toString() : string
Subclasses should override this method to provide a more specific description of the actual object being represented.
inherited_from | \Zend_Pdf_FileParserDataSource::__toString() |
---|
string
__toString() : string
Subclasses should override this method to provide a more specific description of the actual object being represented.
string
getOffset() : integer
integer
getSize() : integer
integer
moveToOffset(integer $offset)
Throws an exception if the file pointer cannot be moved or if it is moved beyond EOF (end of file).
inherited_from | \Zend_Pdf_FileParserDataSource::moveToOffset() |
---|
integer
Destination byte offset.
\Zend_Pdf_Exception |
---|
moveToOffset(integer $offset)
Throws an exception you attempt to move before the beginning or beyond the end of the data source.
If a subclass needs to perform additional tasks (such as performing a fseek() on a filesystem source), it should do so after calling this parent method.
integer
Destination byte offset.
\Zend_Pdf_Exception |
---|
readAllBytes() : string
Preserves the current file seek position.
inherited_from | \Zend_Pdf_FileParserDataSource::readAllBytes() |
---|
string
readAllBytes() : string
This method may be called at any time and so must preserve the byte offset of the read position, both through $this->_offset and whatever other additional pointers (such as the seek position of a file pointer) that might be used.
string
readBytes(integer $byteCount) : string
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.
inherited_from | \Zend_Pdf_FileParserDataSource::readBytes() |
---|
integer
Number of bytes to read.
\Zend_Pdf_Exception |
---|
string
readBytes(integer $byteCount) : string
Must advance the read position by the number of bytes read by updating $this->_offset.
Throws an exception if there is insufficient data to completely fulfill the request or if an error occurs.
integer
Number of bytes to read.
\Zend_Pdf_Exception |
---|
string
skipBytes(integer $byteCount)
You may move forward (positive numbers) or backward (negative numbers). Throws an exception you attempt to move before the beginning or beyond the end of the data source.
integer
Number of bytes to skip.
\Zend_Pdf_Exception |
---|
$_filePath : string
''
$_fileResource : resource
null
$_offset : integer
0
$_size : integer
0