RendererInterface.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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-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. * @category Zend
  23. * @package Zend_Feed_Writer
  24. * @copyright Copyright (c) 2005-2009 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. public function render();
  30. public function saveXml();
  31. public function getDomDocument();
  32. public function getElement();
  33. public function getDataContainer();
  34. public function ignoreExceptions();
  35. public function getExceptions();
  36. /**
  37. * Set the current feed type being exported to "rss" or "atom". This allows
  38. * other objects to gracefully choose whether to execute or not, depending
  39. * on their appropriateness for the current type, e.g. renderers.
  40. *
  41. * @param string $type
  42. */
  43. public function setType($type);
  44. /**
  45. * Retrieve the current or last feed type exported.
  46. *
  47. * @return string Value will be "rss" or "atom"
  48. */
  49. public function getType();
  50. /**
  51. * Sets the absolute root element for the XML feed being generated. This
  52. * helps simplify the appending of namespace declarations, but also ensures
  53. * namespaces are added to the root element - not scattered across the entire
  54. * XML file - may assist namespace unsafe parsers and looks pretty ;).
  55. *
  56. * @param DOMElement $root
  57. */
  58. public function setRootElement(DOMElement $root);
  59. /**
  60. * Retrieve the absolute root element for the XML feed being generated.
  61. *
  62. * @return DOMElement
  63. */
  64. public function getRootElement();
  65. }