Interface.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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-2009 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /**
  22. * PDF element factory interface.
  23. * Responsibility is to log PDF changes
  24. *
  25. * @package Zend_Pdf
  26. * @copyright Copyright (c) 2005-2009 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. * Close factory and clean-up resources
  33. *
  34. * @internal
  35. */
  36. public function close();
  37. /**
  38. * Get source factory object
  39. *
  40. * @return Zend_Pdf_ElementFactory
  41. */
  42. public function resolve();
  43. /**
  44. * Get factory ID
  45. *
  46. * @return integer
  47. */
  48. public function getId();
  49. /**
  50. * Set object counter
  51. *
  52. * @param integer $objCount
  53. */
  54. public function setObjectCount($objCount);
  55. /**
  56. * Get object counter
  57. *
  58. * @return integer
  59. */
  60. public function getObjectCount();
  61. /**
  62. * Attach factory to the current;
  63. *
  64. * @param Zend_Pdf_ElementFactory_Interface $factory
  65. */
  66. public function attach(Zend_Pdf_ElementFactory_Interface $factory);
  67. /**
  68. * Calculate object enumeration shift.
  69. *
  70. * @internal
  71. * @param Zend_Pdf_ElementFactory_Interface $factory
  72. * @return integer
  73. */
  74. public function calculateShift(Zend_Pdf_ElementFactory_Interface $factory);
  75. /**
  76. * Retrive object enumeration shift.
  77. *
  78. * @param Zend_Pdf_ElementFactory_Interface $factory
  79. * @return integer
  80. * @throws Zend_Pdf_Exception
  81. */
  82. public function getEnumerationShift(Zend_Pdf_ElementFactory_Interface $factory);
  83. /**
  84. * Mark object as modified in context of current factory.
  85. *
  86. * @param Zend_Pdf_Element_Object $obj
  87. * @throws Zend_Pdf_Exception
  88. */
  89. public function markAsModified(Zend_Pdf_Element_Object $obj);
  90. /**
  91. * Remove object in context of current factory.
  92. *
  93. * @param Zend_Pdf_Element_Object $obj
  94. * @throws Zend_Pdf_Exception
  95. */
  96. public function remove(Zend_Pdf_Element_Object $obj);
  97. /**
  98. * Generate new Zend_Pdf_Element_Object
  99. *
  100. * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
  101. *
  102. * @param Zend_Pdf_Element $objectValue
  103. * @return Zend_Pdf_Element_Object
  104. */
  105. public function newObject(Zend_Pdf_Element $objectValue);
  106. /**
  107. * Generate new Zend_Pdf_Element_Object_Stream
  108. *
  109. * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
  110. *
  111. * @param mixed $objectValue
  112. * @return Zend_Pdf_Element_Object_Stream
  113. */
  114. public function newStreamObject($streamValue);
  115. /**
  116. * Enumerate modified objects.
  117. * Returns array of Zend_Pdf_UpdateInfoContainer
  118. *
  119. * @param Zend_Pdf_ElementFactory $rootFactory
  120. * @return array
  121. */
  122. public function listModifiedObjects($rootFactory = null);
  123. /**
  124. * Check if PDF file was modified
  125. *
  126. * @return boolean
  127. */
  128. public function isModified();
  129. }