API Documentation

Pdf/FileParserDataSource/File.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Pdf
subpackage
FileParser
version
$Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Pdf_FileParserDataSource_File

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Pdf_FileParserDataSource_File

Extends from
Zend_Pdf_FileParserDataSource
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Pdf
subpackage
FileParser
Properties
$_filePath
$_fileResource
Methods
__construct
__destruct
readBytes
readAllBytes
__toString
moveToOffset

Description

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 {@link fopen()} (through URL wrappers). It may be used for local filesystem objects only.

Properties

$_filePath

string $_filePath = ''

Fully-qualified path to the file.

Details

$_filePath
string
visibility
protected
default
final
false
static
false

$_fileResource

resource $_fileResource = 'null'

File resource handle .

Details

$_fileResource
resource
visibility
protected
default
null
final
false
static
false

Methods

__construct

__construct( string $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.

Arguments
$filePath
string
Fully-qualified path to the file.
Details
visibility
public
final
false
static
false
throws

__destruct

__destruct( ) :

Object destructor.

Closes the file if it had been successfully opened.

Details
visibility
public
final
false
static
false

__toString

__toString( ) : string

Returns the full filesystem path of the file.

Output
string
Details
visibility
public
final
false
static
false

moveToOffset

moveToOffset( integer $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).

Arguments
$offset
integer
Destination byte offset.
Details
visibility
public
final
false
static
false
throws

readAllBytes

readAllBytes( ) : string

Returns the entire contents of the file as a string.

Preserves the current file seek position.

Output
string
Details
visibility
public
final
false
static
false

readBytes

readBytes( integer $byteCount ) : string

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.

Arguments
$byteCount
integer
Number of bytes to read.
Output
string
Details
visibility
public
final
false
static
false
throws
Documentation was generated by DocBlox.