2
0

Interface.php 3.6 KB

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