Class Zend_Pdf_FileParserDataSource_File

Description

Concrete subclass of 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 http://www.php.net/fopen (through URL wrappers). It may be used for local filesystem objects only.

  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Pdf/FileParserDataSource/File.php (line 38)

Zend_Pdf_FileParserDataSource
   |
   --Zend_Pdf_FileParserDataSource_File
Variable Summary
 string $_filePath
 resource $_fileResource
Method Summary
 Zend_Pdf_FileParserDataSource_File __construct (string $filePath)
 void __destruct ()
 void moveToOffset (integer $offset)
 string readAllBytes ()
 string readBytes (integer $byteCount)
 string __toString ()
Variables
string $_filePath = '' (line 47)

Fully-qualified path to the file.

  • access: protected
resource $_fileResource = null (line 53)

File resource handle .

  • access: protected

Inherited Variables

Inherited from Zend_Pdf_FileParserDataSource

Zend_Pdf_FileParserDataSource::$_offset
Zend_Pdf_FileParserDataSource::$_size
Methods
Constructor __construct (line 73)

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.

  • access: public
  • throws: Zend_Pdf_Exception
Zend_Pdf_FileParserDataSource_File __construct (string $filePath)
  • string $filePath: Fully-qualified path to the file.

Redefinition of:
Zend_Pdf_FileParserDataSource::__construct()
Object constructor. Opens the data source for parsing.
Destructor __destruct (line 99)

Object destructor.

Closes the file if it had been successfully opened.

  • access: public
void __destruct ()

Redefinition of:
Zend_Pdf_FileParserDataSource::__destruct()
Object destructor. Closes the data source.
moveToOffset (line 171)

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).

  • access: public
  • throws: Zend_Pdf_Exception
void moveToOffset (integer $offset)
  • integer $offset: Destination byte offset.

Redefinition of:
Zend_Pdf_FileParserDataSource::moveToOffset()
Moves the current read position to the specified byte offset.
readAllBytes (line 141)

Returns the entire contents of the file as a string.

Preserves the current file seek position.

  • access: public
string readAllBytes ()

Redefinition of:
Zend_Pdf_FileParserDataSource::readAllBytes()
Returns the entire contents of the data source as a string.
readBytes (line 119)

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.

  • access: public
  • throws: Zend_Pdf_Exception
string readBytes (integer $byteCount)
  • integer $byteCount: Number of bytes to read.

Redefinition of:
Zend_Pdf_FileParserDataSource::readBytes()
Returns the specified number of raw bytes from the data source at the byte offset of the current read position.
__toString (line 154)

Returns the full filesystem path of the file.

  • access: public
string __toString ()

Redefinition of:
Zend_Pdf_FileParserDataSource::__toString()
Returns a description of the object for debugging purposes.

Inherited Methods

Inherited From Zend_Pdf_FileParserDataSource

 Zend_Pdf_FileParserDataSource::__construct()
 Zend_Pdf_FileParserDataSource::getOffset()
 Zend_Pdf_FileParserDataSource::getSize()
 Zend_Pdf_FileParserDataSource::moveToOffset()
 Zend_Pdf_FileParserDataSource::readAllBytes()
 Zend_Pdf_FileParserDataSource::readBytes()
 Zend_Pdf_FileParserDataSource::skipBytes()
 Zend_Pdf_FileParserDataSource::__destruct()
 Zend_Pdf_FileParserDataSource::__toString()

Documentation generated on Wed, 21 Feb 2007 11:47:56 -0800 by phpDocumentor 1.3.1