|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Pdf |
|
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
19 * @version $Id: Interface.php 22797 2010-08-06 15:02:12Z alexander $ |
|
20 */ |
|
21 |
|
22 /** |
|
23 * PDF element factory interface. |
|
24 * Responsibility is to log PDF changes |
|
25 * |
|
26 * @package Zend_Pdf |
|
27 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
29 */ |
|
30 interface Zend_Pdf_ElementFactory_Interface |
|
31 { |
|
32 /** |
|
33 * Get factory |
|
34 * |
|
35 * @return Zend_Pdf_ElementFactory_Interface |
|
36 */ |
|
37 public function getFactory(); |
|
38 |
|
39 /** |
|
40 * Close factory and clean-up resources |
|
41 * |
|
42 * @internal |
|
43 */ |
|
44 public function close(); |
|
45 |
|
46 /** |
|
47 * Get source factory object |
|
48 * |
|
49 * @return Zend_Pdf_ElementFactory |
|
50 */ |
|
51 public function resolve(); |
|
52 |
|
53 /** |
|
54 * Get factory ID |
|
55 * |
|
56 * @return integer |
|
57 */ |
|
58 public function getId(); |
|
59 |
|
60 /** |
|
61 * Set object counter |
|
62 * |
|
63 * @param integer $objCount |
|
64 */ |
|
65 public function setObjectCount($objCount); |
|
66 |
|
67 /** |
|
68 * Get object counter |
|
69 * |
|
70 * @return integer |
|
71 */ |
|
72 public function getObjectCount(); |
|
73 |
|
74 /** |
|
75 * Attach factory to the current; |
|
76 * |
|
77 * @param Zend_Pdf_ElementFactory_Interface $factory |
|
78 */ |
|
79 public function attach(Zend_Pdf_ElementFactory_Interface $factory); |
|
80 |
|
81 /** |
|
82 * Calculate object enumeration shift. |
|
83 * |
|
84 * @param Zend_Pdf_ElementFactory_Interface $factory |
|
85 * @return integer |
|
86 */ |
|
87 public function calculateShift(Zend_Pdf_ElementFactory_Interface $factory); |
|
88 |
|
89 /** |
|
90 * Clean enumeration shift cache. |
|
91 * Has to be used after PDF render operation to let followed updates be correct. |
|
92 * |
|
93 * @param Zend_Pdf_ElementFactory_Interface $factory |
|
94 * @return integer |
|
95 */ |
|
96 public function cleanEnumerationShiftCache(); |
|
97 |
|
98 /** |
|
99 * Retrive object enumeration shift. |
|
100 * |
|
101 * @param Zend_Pdf_ElementFactory_Interface $factory |
|
102 * @return integer |
|
103 * @throws Zend_Pdf_Exception |
|
104 */ |
|
105 public function getEnumerationShift(Zend_Pdf_ElementFactory_Interface $factory); |
|
106 |
|
107 /** |
|
108 * Mark object as modified in context of current factory. |
|
109 * |
|
110 * @param Zend_Pdf_Element_Object $obj |
|
111 * @throws Zend_Pdf_Exception |
|
112 */ |
|
113 public function markAsModified(Zend_Pdf_Element_Object $obj); |
|
114 |
|
115 /** |
|
116 * Remove object in context of current factory. |
|
117 * |
|
118 * @param Zend_Pdf_Element_Object $obj |
|
119 * @throws Zend_Pdf_Exception |
|
120 */ |
|
121 public function remove(Zend_Pdf_Element_Object $obj); |
|
122 |
|
123 /** |
|
124 * Generate new Zend_Pdf_Element_Object |
|
125 * |
|
126 * @todo Reusage of the freed object. It's not a support of new feature, but only improvement. |
|
127 * |
|
128 * @param Zend_Pdf_Element $objectValue |
|
129 * @return Zend_Pdf_Element_Object |
|
130 */ |
|
131 public function newObject(Zend_Pdf_Element $objectValue); |
|
132 |
|
133 /** |
|
134 * Generate new Zend_Pdf_Element_Object_Stream |
|
135 * |
|
136 * @todo Reusage of the freed object. It's not a support of new feature, but only improvement. |
|
137 * |
|
138 * @param mixed $objectValue |
|
139 * @return Zend_Pdf_Element_Object_Stream |
|
140 */ |
|
141 public function newStreamObject($streamValue); |
|
142 |
|
143 /** |
|
144 * Enumerate modified objects. |
|
145 * Returns array of Zend_Pdf_UpdateInfoContainer |
|
146 * |
|
147 * @param Zend_Pdf_ElementFactory $rootFactory |
|
148 * @return array |
|
149 */ |
|
150 public function listModifiedObjects($rootFactory = null); |
|
151 |
|
152 /** |
|
153 * Check if PDF file was modified |
|
154 * |
|
155 * @return boolean |
|
156 */ |
|
157 public function isModified(); |
|
158 } |