3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Feed\Writer\Renderer;
17 interface RendererInterface
24 public function render();
27 * Save feed and/or entry to XML and return string
31 public function saveXml();
38 public function getDomDocument();
41 * Get document element from DOM
45 public function getElement();
48 * Get data container containing feed items
52 public function getDataContainer();
55 * Should exceptions be ignored?
59 public function ignoreExceptions();
62 * Get list of thrown exceptions
66 public function getExceptions();
69 * Set the current feed type being exported to "rss" or "atom". This allows
70 * other objects to gracefully choose whether to execute or not, depending
71 * on their appropriateness for the current type, e.g. renderers.
75 public function setType($type);
78 * Retrieve the current or last feed type exported.
80 * @return string Value will be "rss" or "atom"
82 public function getType();
85 * Sets the absolute root element for the XML feed being generated. This
86 * helps simplify the appending of namespace declarations, but also ensures
87 * namespaces are added to the root element - not scattered across the entire
88 * XML file - may assist namespace unsafe parsers and looks pretty ;).
90 * @param DOMElement $root
92 public function setRootElement(DOMElement $root);
95 * Retrieve the absolute root element for the XML feed being generated.
99 public function getRootElement();