PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/Pdf/ElementFactory/Interface.php

https://bitbucket.org/bigstylee/zend-framework
PHP | 158 lines | 20 code | 16 blank | 122 comment | 0 complexity | b3398a388c4a433e1b2feb631620d265 MD5 | raw file
  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-2012 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 24593 2012-01-05 20:35:02Z matthew $
  20. */
  21. /**
  22. * PDF element factory interface.
  23. * Responsibility is to log PDF changes
  24. *
  25. * @package Zend_Pdf
  26. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  27. * @license http://framework.zend.com/license/new-bsd New BSD License
  28. */
  29. interface Zend_Pdf_ElementFactory_Interface
  30. {
  31. /**
  32. * Get factory
  33. *
  34. * @return Zend_Pdf_ElementFactory_Interface
  35. */
  36. public function getFactory();
  37. /**
  38. * Close factory and clean-up resources
  39. *
  40. * @internal
  41. */
  42. public function close();
  43. /**
  44. * Get source factory object
  45. *
  46. * @return Zend_Pdf_ElementFactory
  47. */
  48. public function resolve();
  49. /**
  50. * Get factory ID
  51. *
  52. * @return integer
  53. */
  54. public function getId();
  55. /**
  56. * Set object counter
  57. *
  58. * @param integer $objCount
  59. */
  60. public function setObjectCount($objCount);
  61. /**
  62. * Get object counter
  63. *
  64. * @return integer
  65. */
  66. public function getObjectCount();
  67. /**
  68. * Attach factory to the current;
  69. *
  70. * @param Zend_Pdf_ElementFactory_Interface $factory
  71. */
  72. public function attach(Zend_Pdf_ElementFactory_Interface $factory);
  73. /**
  74. * Calculate object enumeration shift.
  75. *
  76. * @param Zend_Pdf_ElementFactory_Interface $factory
  77. * @return integer
  78. */
  79. public function calculateShift(Zend_Pdf_ElementFactory_Interface $factory);
  80. /**
  81. * Clean enumeration shift cache.
  82. * Has to be used after PDF render operation to let followed updates be correct.
  83. *
  84. * @param Zend_Pdf_ElementFactory_Interface $factory
  85. * @return integer
  86. */
  87. public function cleanEnumerationShiftCache();
  88. /**
  89. * Retrive object enumeration shift.
  90. *
  91. * @param Zend_Pdf_ElementFactory_Interface $factory
  92. * @return integer
  93. * @throws Zend_Pdf_Exception
  94. */
  95. public function getEnumerationShift(Zend_Pdf_ElementFactory_Interface $factory);
  96. /**
  97. * Mark object as modified in context of current factory.
  98. *
  99. * @param Zend_Pdf_Element_Object $obj
  100. * @throws Zend_Pdf_Exception
  101. */
  102. public function markAsModified(Zend_Pdf_Element_Object $obj);
  103. /**
  104. * Remove object in context of current factory.
  105. *
  106. * @param Zend_Pdf_Element_Object $obj
  107. * @throws Zend_Pdf_Exception
  108. */
  109. public function remove(Zend_Pdf_Element_Object $obj);
  110. /**
  111. * Generate new Zend_Pdf_Element_Object
  112. *
  113. * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
  114. *
  115. * @param Zend_Pdf_Element $objectValue
  116. * @return Zend_Pdf_Element_Object
  117. */
  118. public function newObject(Zend_Pdf_Element $objectValue);
  119. /**
  120. * Generate new Zend_Pdf_Element_Object_Stream
  121. *
  122. * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
  123. *
  124. * @param mixed $objectValue
  125. * @return Zend_Pdf_Element_Object_Stream
  126. */
  127. public function newStreamObject($streamValue);
  128. /**
  129. * Enumerate modified objects.
  130. * Returns array of Zend_Pdf_UpdateInfoContainer
  131. *
  132. * @param Zend_Pdf_ElementFactory $rootFactory
  133. * @return array
  134. */
  135. public function listModifiedObjects($rootFactory = null);
  136. /**
  137. * Check if PDF file was modified
  138. *
  139. * @return boolean
  140. */
  141. public function isModified();
  142. }