Pdf/ElementFactory.php

Show: PublicProtectedPrivateinherited
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 [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Pdf  
Version
$Id$  

\Zend_Pdf_ElementFactory

Package: Zend_Pdf
PDF element factory.
Responsibility is to log PDF changes
Implements
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprivatearray $_attachedFactories = array()
List of the attached object factories.
Array of Zend_Pdf_ElementFactory_Interface objects
Default valuearray()Details
Type
array
>VPropertyprivateinteger $_factoryId
Factory internal id
Details
Type
integer
>VPropertyprivateinteger $_identity = 0
static
Identity, used for factory id generation
Default value0Details
Type
integer
>VPropertyprivatearray $_modifiedObjects = array()
List of the modified objects.
Also contains new and removed objects Array: ojbectNumber => Zend_Pdf_Element_Object
Default valuearray()Details
Type
array
>VPropertyprivateinteger $_objectCount
PDF object counter.
Actually it's an object number for new PDF object
Details
Type
integer
>VPropertyprivatearray $_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
>VPropertyprivate\SplObjectStorage $_removedObjects
List of the removed objects
Array: ojbectNumber => Zend_Pdf_Element_Object
Details
Type
\SplObjectStorage
>VPropertyprivatearray $_shiftCalculationCache = array()
Internal cache to save calculated shifts
Default valuearray()Details
Type
array

Methods

methodpublic__construct(integer $objCount) : void

Object constructor

Parameters
NameTypeDescription
$objCountinteger
methodpublicattach(\Zend_Pdf_ElementFactory_Interface $factory) : void

Attach factory to the current;

Parameters
NameTypeDescription
$factory\Zend_Pdf_ElementFactory_Interface
methodpubliccalculateShift(\Zend_Pdf_ElementFactory_Interface $factory) : integer

Calculate object enumeration shift.

Parameters
NameTypeDescription
$factory\Zend_Pdf_ElementFactory_Interface
Returns
TypeDescription
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
NameTypeDescription
$objCountinteger
Returns
TypeDescription
\Zend_Pdf_ElementFactory_Interface
methodpublicfetchObject(string $refString) : \Zend_Pdf_Element_Object | null

Fetch object specified by reference

Parameters
NameTypeDescription
$refStringstring
Returns
TypeDescription
\Zend_Pdf_Element_Object | null
methodpublicgetEnumerationShift(\Zend_Pdf_ElementFactory_Interface $factory) : integer

Retrive object enumeration shift.

Parameters
NameTypeDescription
$factory\Zend_Pdf_ElementFactory_Interface
Returns
TypeDescription
integer
Throws
ExceptionDescription
\Zend_Pdf_Exception
methodpublicgetFactory() : \Zend_Pdf_ElementFactory_Interface

Get factory

methodpublicgetId() : integer

Get factory ID

Returns
TypeDescription
integer
methodpublicgetObjectCount() : integer

Get object counter

Returns
TypeDescription
integer
methodpublicisModified() : boolean

Check if PDF file was modified

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

Enumerate modified objects.

Returns array of Zend_Pdf_UpdateInfoContainer
Parameters
NameTypeDescription
$rootFactory\Zend_Pdf_ElementFactory_Interface
Returns
TypeDescription
array
methodpublicmarkAsModified(\Zend_Pdf_Element_Object $obj) : void

Mark object as modified in context of current factory.

Parameters
NameTypeDescription
$obj\Zend_Pdf_Element_Object
Throws
ExceptionDescription
\Zend_Pdf_Exception
methodpublicnewObject(\Zend_Pdf_Element $objectValue) : \Zend_Pdf_Element_Object

Generate new Zend_Pdf_Element_Object

Parameters
NameTypeDescription
$objectValue\Zend_Pdf_Element
Returns
TypeDescription
\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
NameTypeDescription
$streamValue
Returns
TypeDescription
\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
NameTypeDescription
$obj\Zend_Pdf_Element_Object
$refStringstring
methodpublicremove(\Zend_Pdf_Element_Object $obj) : void

Remove object in context of current factory.

Parameters
NameTypeDescription
$obj\Zend_Pdf_Element_Object
Throws
ExceptionDescription
\Zend_Pdf_Exception
methodpublicresolve() : \Zend_Pdf_ElementFactory

Get source factory object

Returns
TypeDescription
\Zend_Pdf_ElementFactory
methodpublicsetObjectCount(integer $objCount) : void

Set object counter

Parameters
NameTypeDescription
$objCountinteger
Documentation was generated by phpDocumentor 2.2.0 .