File indexing completed on 2024-12-22 05:36:54
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Pdf 0017 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0018 * @license http://framework.zend.com/license/new-bsd New BSD License 0019 * @version $Id$ 0020 */ 0021 0022 /** 0023 * PDF element factory interface. 0024 * Responsibility is to log PDF changes 0025 * 0026 * @package Zend_Pdf 0027 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0028 * @license http://framework.zend.com/license/new-bsd New BSD License 0029 */ 0030 interface Zend_Pdf_ElementFactory_Interface 0031 { 0032 /** 0033 * Get factory 0034 * 0035 * @return Zend_Pdf_ElementFactory_Interface 0036 */ 0037 public function getFactory(); 0038 0039 /** 0040 * Close factory and clean-up resources 0041 * 0042 * @internal 0043 */ 0044 public function close(); 0045 0046 /** 0047 * Get source factory object 0048 * 0049 * @return Zend_Pdf_ElementFactory 0050 */ 0051 public function resolve(); 0052 0053 /** 0054 * Get factory ID 0055 * 0056 * @return integer 0057 */ 0058 public function getId(); 0059 0060 /** 0061 * Set object counter 0062 * 0063 * @param integer $objCount 0064 */ 0065 public function setObjectCount($objCount); 0066 0067 /** 0068 * Get object counter 0069 * 0070 * @return integer 0071 */ 0072 public function getObjectCount(); 0073 0074 /** 0075 * Attach factory to the current; 0076 * 0077 * @param Zend_Pdf_ElementFactory_Interface $factory 0078 */ 0079 public function attach(Zend_Pdf_ElementFactory_Interface $factory); 0080 0081 /** 0082 * Calculate object enumeration shift. 0083 * 0084 * @param Zend_Pdf_ElementFactory_Interface $factory 0085 * @return integer 0086 */ 0087 public function calculateShift(Zend_Pdf_ElementFactory_Interface $factory); 0088 0089 /** 0090 * Clean enumeration shift cache. 0091 * Has to be used after PDF render operation to let followed updates be correct. 0092 * 0093 * @param Zend_Pdf_ElementFactory_Interface $factory 0094 * @return integer 0095 */ 0096 public function cleanEnumerationShiftCache(); 0097 0098 /** 0099 * Retrive object enumeration shift. 0100 * 0101 * @param Zend_Pdf_ElementFactory_Interface $factory 0102 * @return integer 0103 * @throws Zend_Pdf_Exception 0104 */ 0105 public function getEnumerationShift(Zend_Pdf_ElementFactory_Interface $factory); 0106 0107 /** 0108 * Mark object as modified in context of current factory. 0109 * 0110 * @param Zend_Pdf_Element_Object $obj 0111 * @throws Zend_Pdf_Exception 0112 */ 0113 public function markAsModified(Zend_Pdf_Element_Object $obj); 0114 0115 /** 0116 * Remove object in context of current factory. 0117 * 0118 * @param Zend_Pdf_Element_Object $obj 0119 * @throws Zend_Pdf_Exception 0120 */ 0121 public function remove(Zend_Pdf_Element_Object $obj); 0122 0123 /** 0124 * Generate new Zend_Pdf_Element_Object 0125 * 0126 * @todo Reusage of the freed object. It's not a support of new feature, but only improvement. 0127 * 0128 * @param Zend_Pdf_Element $objectValue 0129 * @return Zend_Pdf_Element_Object 0130 */ 0131 public function newObject(Zend_Pdf_Element $objectValue); 0132 0133 /** 0134 * Generate new Zend_Pdf_Element_Object_Stream 0135 * 0136 * @todo Reusage of the freed object. It's not a support of new feature, but only improvement. 0137 * 0138 * @param mixed $objectValue 0139 * @return Zend_Pdf_Element_Object_Stream 0140 */ 0141 public function newStreamObject($streamValue); 0142 0143 /** 0144 * Enumerate modified objects. 0145 * Returns array of Zend_Pdf_UpdateInfoContainer 0146 * 0147 * @param Zend_Pdf_ElementFactory $rootFactory 0148 * @return array 0149 */ 0150 public function listModifiedObjects($rootFactory = null); 0151 0152 /** 0153 * Check if PDF file was modified 0154 * 0155 * @return boolean 0156 */ 0157 public function isModified(); 0158 }