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.
PDF element factory.
Responsibility is to log PDF changes

array
$_attachedFactories= 'array()'
List of the attached object factories.
Array of Zend_Pdf_ElementFactory_Interface objects
array()
Details
integer
$_identity= '0'
Identity, used for factory id generation
0
Details
array
$_modifiedObjects= 'array()'
List of the modified objects.
Also contains new and removed objects
Array: ojbectNumber => Zend_Pdf_Element_Object
array()
Details
integer
$_objectCount= ''
PDF object counter.
Actually it's an object number for new PDF object

array
$_registeredObjects= 'array()'
List of registered objects.
Used for resources clean up when factory is destroyed.
Array of Zend_Pdf_Element objects
array()
Details
\SplObjectStorage
$_removedObjects= ''
List of the removed objects
Array: ojbectNumber => Zend_Pdf_Element_Object

__construct(
integer $objCount
)
:
void
Object constructor
Name | Type | Description |
---|---|---|
$objCount | integer |

attach(
\Zend_Pdf_ElementFactory_Interface $factory
)
:
void
Attach factory to the current;
Name | Type | Description |
---|---|---|
$factory | \Zend_Pdf_ElementFactory_Interface |

calculateShift(
\Zend_Pdf_ElementFactory_Interface $factory
)
:
integer
Calculate object enumeration shift.
Name | Type | Description |
---|---|---|
$factory | \Zend_Pdf_ElementFactory_Interface |
Type | Description |
---|---|
integer |

cleanEnumerationShiftCache(
)
:
void
Clean enumeration shift cache.
Has to be used after PDF render operation to let followed updates be correct.

createFactory(
integer $objCount
)
:
\Zend_Pdf_ElementFactory_Interface
Factory generator
Name | Type | Description |
---|---|---|
$objCount | integer |
Type | Description |
---|---|
\Zend_Pdf_ElementFactory_Interface |

fetchObject(
string $refString
)
:
\Zend_Pdf_Element_Object|null
Fetch object specified by reference
Name | Type | Description |
---|---|---|
$refString | string |
Type | Description |
---|---|
\Zend_Pdf_Element_Object|null |

getEnumerationShift(
\Zend_Pdf_ElementFactory_Interface $factory
)
:
integer
Retrive object enumeration shift.
Name | Type | Description |
---|---|---|
$factory | \Zend_Pdf_ElementFactory_Interface |
Type | Description |
---|---|
integer |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

getFactory(
)
:
\Zend_Pdf_ElementFactory_Interface
Get factory
Type | Description |
---|---|
\Zend_Pdf_ElementFactory_Interface |

listModifiedObjects(
\Zend_Pdf_ElementFactory_Interface $rootFactory
=
null
)
:
array
Enumerate modified objects.
Returns array of Zend_Pdf_UpdateInfoContainer
Name | Type | Description |
---|---|---|
$rootFactory | \Zend_Pdf_ElementFactory_Interface |
Type | Description |
---|---|
array |

markAsModified(
\Zend_Pdf_Element_Object $obj
)
:
void
Mark object as modified in context of current factory.
Name | Type | Description |
---|---|---|
$obj | \Zend_Pdf_Element_Object |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

newObject(
\Zend_Pdf_Element $objectValue
)
:
\Zend_Pdf_Element_Object
Generate new Zend_Pdf_Element_Object
Name | Type | Description |
---|---|---|
$objectValue | \Zend_Pdf_Element |
Type | Description |
---|---|
\Zend_Pdf_Element_Object |

newStreamObject(
$streamValue
)
:
\Zend_Pdf_Element_Object_Stream
Generate new Zend_Pdf_Element_Object_Stream
Name | Type | Description |
---|---|---|
$streamValue |
Type | Description |
---|---|
\Zend_Pdf_Element_Object_Stream |

registerObject(
\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
Name | Type | Description |
---|---|---|
$obj | \Zend_Pdf_Element_Object | |
$refString | string |

remove(
\Zend_Pdf_Element_Object $obj
)
:
void
Remove object in context of current factory.
Name | Type | Description |
---|---|---|
$obj | \Zend_Pdf_Element_Object |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

resolve(
)
:
\Zend_Pdf_ElementFactory
Get source factory object
Type | Description |
---|---|
\Zend_Pdf_ElementFactory |