API Documentation

Pdf/ElementFactory.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
version
$Id: ElementFactory.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Pdf_ElementFactory

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_ElementFactory

Implements
Zend_Pdf_ElementFactory_Interface
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
Properties
$_modifiedObjects
$_removedObjects
$_registeredObjects
$_objectCount
$_attachedFactories
$_factoryId
$_identity
$_shiftCalculationCache
Methods
__construct
createFactory
close
resolve
getId
setObjectCount
getObjectCount
attach
calculateShift
cleanEnumerationShiftCache
getEnumerationShift
markAsModified
remove
newObject
newStreamObject
listModifiedObjects
registerObject
fetchObject
isModified

Description

PDF element factory.

Responsibility is to log PDF changes

Properties

$_attachedFactories

array $_attachedFactories = 'array'

List of the attached object factories.

Array of Zend_Pdf_ElementFactory_Interface objects

Details

$_attachedFactories
array
visibility
private
default
array
final
false
static
false

$_factoryId

integer $_factoryId = ''

Factory internal id

Details

$_factoryId
integer
visibility
private
default
final
false
static
false

$_identity

integer $_identity = '0'

Identity, used for factory id generation

Details

$_identity
integer
visibility
private
default
0
final
false
static
true

$_modifiedObjects

array $_modifiedObjects = 'array'

List of the modified objects.

Also contains new and removed objects

Array: ojbectNumber => Zend_Pdf_Element_Object

Details

$_modifiedObjects
array
visibility
private
default
array
final
false
static
false

$_objectCount

integer $_objectCount = ''

PDF object counter.

Actually it's an object number for new PDF object

Details

$_objectCount
integer
visibility
private
default
final
false
static
false

$_registeredObjects

array $_registeredObjects = 'array'

List of registered objects.

Used for resources clean up when factory is destroyed.

Array of Zend_Pdf_Element objects

Details

$_registeredObjects
array
visibility
private
default
array
final
false
static
false

$_removedObjects

SplObjectStorage $_removedObjects = ''

List of the removed objects

Array: ojbectNumber => Zend_Pdf_Element_Object

Details

$_removedObjects
SplObjectStorage
visibility
private
default
final
false
static
false

$_shiftCalculationCache

array $_shiftCalculationCache = 'array'

Internal cache to save calculated shifts

Details

$_shiftCalculationCache
array
visibility
private
default
array
final
false
static
false

Methods

__construct

__construct( integer $objCount ) :

Object constructor

Arguments
$objCount
integer
Details
visibility
public
final
false
static
false

attach

attach( Zend_Pdf_ElementFactory_Interface $factory ) :

Attach factory to the current;

Arguments
$factory
Zend_Pdf_ElementFactory_Interface
Details
visibility
public
final
false
static
false

calculateShift

calculateShift( Zend_Pdf_ElementFactory_Interface $factory ) : integer

Calculate object enumeration shift.

Arguments
$factory
Zend_Pdf_ElementFactory_Interface
Output
integer
Details
visibility
public
final
false
static
false

cleanEnumerationShiftCache

cleanEnumerationShiftCache( ) :

Clean enumeration shift cache.

Has to be used after PDF render operation to let followed updates be correct.

Details
visibility
public
final
false
static
false

close

close( ) :

Close factory and clean-up resources

Details
visibility
public
final
false
static
false
internal

createFactory

createFactory( integer $objCount ) : Zend_Pdf_ElementFactory_Interface

Factory generator

Arguments
$objCount
integer
Details
visibility
public
final
false
static
true

fetchObject

fetchObject( string $refString ) : Zend_Pdf_Element_Object|null

Fetch object specified by reference

Arguments
$refString
string
Details
visibility
public
final
false
static
false

getEnumerationShift

getEnumerationShift( Zend_Pdf_ElementFactory_Interface $factory ) : integer

Retrive object enumeration shift.

Arguments
$factory
Zend_Pdf_ElementFactory_Interface
Output
integer
Details
visibility
public
final
false
static
false
throws

getId

getId( ) : integer

Get factory ID

Output
integer
Details
visibility
public
final
false
static
false

getObjectCount

getObjectCount( ) : integer

Get object counter

Output
integer
Details
visibility
public
final
false
static
false

isModified

isModified( ) : boolean

Check if PDF file was modified

Output
boolean
Details
visibility
public
final
false
static
false

listModifiedObjects

listModifiedObjects( Zend_Pdf_ElementFactory_Interface $rootFactory = null ) : array

Enumerate modified objects.

Returns array of Zend_Pdf_UpdateInfoContainer

Arguments
$rootFactory
Zend_Pdf_ElementFactory_Interface
Output
array
Details
visibility
public
final
false
static
false

markAsModified

markAsModified( Zend_Pdf_Element_Object $obj ) :

Mark object as modified in context of current factory.

Arguments
$obj
Zend_Pdf_Element_Object
Details
visibility
public
final
false
static
false
throws

newObject

newObject( Zend_Pdf_Element $objectValue ) : Zend_Pdf_Element_Object

Generate new Zend_Pdf_Element_Object

Arguments
$objectValue
Zend_Pdf_Element
Details
visibility
public
final
false
static
false
todo
Reusage of the freed object. It's not a support of new feature, but only improvement.

newStreamObject

newStreamObject(  $streamValue ) : Zend_Pdf_Element_Object_Stream

Generate new Zend_Pdf_Element_Object_Stream

Arguments
$streamValue
Details
visibility
public
final
false
static
false
todo
Reusage of the freed object. It's not a support of new feature, but only improvement.

registerObject

registerObject( Zend_Pdf_Element_Object $obj, string $refString ) :

Register object in the factory

It's used to clear "parent object" referencies when factory is closed and clean up resources

Arguments
$obj
Zend_Pdf_Element_Object
$refString
string
Details
visibility
public
final
false
static
false

remove

remove( Zend_Pdf_Element_Object $obj ) :

Remove object in context of current factory.

Arguments
$obj
Zend_Pdf_Element_Object
Details
visibility
public
final
false
static
false
throws

resolve

resolve( ) : Zend_Pdf_ElementFactory

Get source factory object

Details
visibility
public
final
false
static
false

setObjectCount

setObjectCount( integer $objCount ) :

Set object counter

Arguments
$objCount
integer
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.