2
0

RendererInterface.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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_Feed_Writer
  17. * @copyright Copyright (c) 2005-2015 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. * @category Zend
  23. * @package Zend_Feed_Writer
  24. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  25. * @license http://framework.zend.com/license/new-bsd New BSD License
  26. */
  27. interface Zend_Feed_Writer_Renderer_RendererInterface
  28. {
  29. /**
  30. * Render feed/entry
  31. *
  32. * @return void
  33. */
  34. public function render();
  35. /**
  36. * Save feed and/or entry to XML and return string
  37. *
  38. * @return string
  39. */
  40. public function saveXml();
  41. /**
  42. * Get DOM document
  43. *
  44. * @return DOMDocument
  45. */
  46. public function getDomDocument();
  47. /**
  48. * Get document element from DOM
  49. *
  50. * @return DOMElement
  51. */
  52. public function getElement();
  53. /**
  54. * Get data container containing feed items
  55. *
  56. * @return mixed
  57. */
  58. public function getDataContainer();
  59. /**
  60. * Should exceptions be ignored?
  61. *
  62. * @return mixed
  63. */
  64. public function ignoreExceptions();
  65. /**
  66. * Get list of thrown exceptions
  67. *
  68. * @return array
  69. */
  70. public function getExceptions();
  71. /**
  72. * Set the current feed type being exported to "rss" or "atom". This allows
  73. * other objects to gracefully choose whether to execute or not, depending
  74. * on their appropriateness for the current type, e.g. renderers.
  75. *
  76. * @param string $type
  77. */
  78. public function setType($type);
  79. /**
  80. * Retrieve the current or last feed type exported.
  81. *
  82. * @return string Value will be "rss" or "atom"
  83. */
  84. public function getType();
  85. /**
  86. * Sets the absolute root element for the XML feed being generated. This
  87. * helps simplify the appending of namespace declarations, but also ensures
  88. * namespaces are added to the root element - not scattered across the entire
  89. * XML file - may assist namespace unsafe parsers and looks pretty ;).
  90. *
  91. * @param DOMElement $root
  92. */
  93. public function setRootElement(DOMElement $root);
  94. /**
  95. * Retrieve the absolute root element for the XML feed being generated.
  96. *
  97. * @return DOMElement
  98. */
  99. public function getRootElement();
  100. }