API Documentation

Zend/Pdf/ElementFactory.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Pdf  
Version
$Id: ElementFactory.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Pdf_ElementFactory

Package: Zend\Pdf

PDF element factory.

Responsibility is to log PDF changes

Implements
\Zend_Pdf_ElementFactory_Interface
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprivatearray  $_attachedFactories= 'array()'

List of the attached object factories.

Array of Zend_Pdf_ElementFactory_Interface objects

Default valuearray()Details
Type
array
Propertyprivateinteger  $_factoryId= ''

Factory internal id

Details
Type
integer
Propertyprivateinteger  $_identity= '0'
static

Identity, used for factory id generation

Default value0Details
Type
integer
Propertyprivatearray  $_modifiedObjects= 'array()'

List of the modified objects.

Also contains new and removed objects

Array: ojbectNumber => Zend_Pdf_Element_Object

Default valuearray()Details
Type
array
Propertyprivateinteger  $_objectCount= ''

PDF object counter.

Actually it's an object number for new PDF object

Details
Type
integer
Propertyprivatearray  $_registeredObjects= 'array()'

List of registered objects.

Used for resources clean up when factory is destroyed.

Array of Zend_Pdf_Element objects

Default valuearray()Details
Type
array
Propertyprivate\SplObjectStorage  $_removedObjects= ''

List of the removed objects

Array: ojbectNumber => Zend_Pdf_Element_Object

Details
Type
\SplObjectStorage
Propertyprivatearray  $_shiftCalculationCache= 'array()'

Internal cache to save calculated shifts

Default valuearray()Details
Type
array

Methods

methodpublic__construct( integer $objCount ) : void

Object constructor

Parameters
Name Type Description
$objCount integer
methodpublicattach( \Zend_Pdf_ElementFactory_Interface $factory ) : void

Attach factory to the current;

Parameters
Name Type Description
$factory \Zend_Pdf_ElementFactory_Interface
methodpubliccalculateShift( \Zend_Pdf_ElementFactory_Interface $factory ) : integer

Calculate object enumeration shift.

Parameters
Name Type Description
$factory \Zend_Pdf_ElementFactory_Interface
Returns
Type Description
integer
methodpubliccleanEnumerationShiftCache( ) : void

Clean enumeration shift cache.

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

methodpubliccreateFactory( integer $objCount ) : \Zend_Pdf_ElementFactory_Interface
static

Factory generator

Parameters
Name Type Description
$objCount integer
Returns
Type Description
\Zend_Pdf_ElementFactory_Interface
methodpublicfetchObject( string $refString ) : \Zend_Pdf_Element_Object|null

Fetch object specified by reference

Parameters
Name Type Description
$refString string
Returns
Type Description
\Zend_Pdf_Element_Object|null
methodpublicgetEnumerationShift( \Zend_Pdf_ElementFactory_Interface $factory ) : integer

Retrive object enumeration shift.

Parameters
Name Type Description
$factory \Zend_Pdf_ElementFactory_Interface
Returns
Type Description
integer
Throws
Exception Description
\Zend_Pdf_Exception
methodpublicgetFactory( ) : \Zend_Pdf_ElementFactory_Interface

Get factory

Returns
Type Description
\Zend_Pdf_ElementFactory_Interface
methodpublicgetId( ) : integer

Get factory ID

Returns
Type Description
integer
methodpublicgetObjectCount( ) : integer

Get object counter

Returns
Type Description
integer
methodpublicisModified( ) : boolean

Check if PDF file was modified

Returns
Type Description
boolean
methodpubliclistModifiedObjects( \Zend_Pdf_ElementFactory_Interface $rootFactory = null ) : array

Enumerate modified objects.

Returns array of Zend_Pdf_UpdateInfoContainer

Parameters
Name Type Description
$rootFactory \Zend_Pdf_ElementFactory_Interface
Returns
Type Description
array
methodpublicmarkAsModified( \Zend_Pdf_Element_Object $obj ) : void

Mark object as modified in context of current factory.

Parameters
Name Type Description
$obj \Zend_Pdf_Element_Object
Throws
Exception Description
\Zend_Pdf_Exception
methodpublicnewObject( \Zend_Pdf_Element $objectValue ) : \Zend_Pdf_Element_Object

Generate new Zend_Pdf_Element_Object

Parameters
Name Type Description
$objectValue \Zend_Pdf_Element
Returns
Type Description
\Zend_Pdf_Element_Object
Details
Todo
Reusage of the freed object. It's not a support of new feature, but only improvement.  
methodpublicnewStreamObject(  $streamValue ) : \Zend_Pdf_Element_Object_Stream

Generate new Zend_Pdf_Element_Object_Stream

Parameters
Name Type Description
$streamValue
Returns
Type Description
\Zend_Pdf_Element_Object_Stream
Details
Todo
Reusage of the freed object. It's not a support of new feature, but only improvement.  
methodpublicregisterObject( \Zend_Pdf_Element_Object $obj, string $refString ) : void

Register object in the factory

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

Parameters
Name Type Description
$obj \Zend_Pdf_Element_Object
$refString string
methodpublicremove( \Zend_Pdf_Element_Object $obj ) : void

Remove object in context of current factory.

Parameters
Name Type Description
$obj \Zend_Pdf_Element_Object
Throws
Exception Description
\Zend_Pdf_Exception
methodpublicresolve( ) : \Zend_Pdf_ElementFactory

Get source factory object

Returns
Type Description
\Zend_Pdf_ElementFactory
methodpublicsetObjectCount( integer $objCount ) : void

Set object counter

Parameters
Name Type Description
$objCount integer
Documentation was generated by DocBlox 0.15.1.