annotate vendor/zendframework/zend-feed/src/Writer/Renderer/RendererInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2 /**
Chris@0 3 * Zend Framework (http://framework.zend.com/)
Chris@0 4 *
Chris@0 5 * @link http://github.com/zendframework/zf2 for the canonical source repository
Chris@0 6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
Chris@0 7 * @license http://framework.zend.com/license/new-bsd New BSD License
Chris@0 8 */
Chris@0 9
Chris@0 10 namespace Zend\Feed\Writer\Renderer;
Chris@0 11
Chris@0 12 use DOMDocument;
Chris@0 13 use DOMElement;
Chris@0 14
Chris@0 15 /**
Chris@0 16 */
Chris@0 17 interface RendererInterface
Chris@0 18 {
Chris@0 19 /**
Chris@0 20 * Render feed/entry
Chris@0 21 *
Chris@0 22 * @return void
Chris@0 23 */
Chris@0 24 public function render();
Chris@0 25
Chris@0 26 /**
Chris@0 27 * Save feed and/or entry to XML and return string
Chris@0 28 *
Chris@0 29 * @return string
Chris@0 30 */
Chris@0 31 public function saveXml();
Chris@0 32
Chris@0 33 /**
Chris@0 34 * Get DOM document
Chris@0 35 *
Chris@0 36 * @return DOMDocument
Chris@0 37 */
Chris@0 38 public function getDomDocument();
Chris@0 39
Chris@0 40 /**
Chris@0 41 * Get document element from DOM
Chris@0 42 *
Chris@0 43 * @return DOMElement
Chris@0 44 */
Chris@0 45 public function getElement();
Chris@0 46
Chris@0 47 /**
Chris@0 48 * Get data container containing feed items
Chris@0 49 *
Chris@0 50 * @return mixed
Chris@0 51 */
Chris@0 52 public function getDataContainer();
Chris@0 53
Chris@0 54 /**
Chris@0 55 * Should exceptions be ignored?
Chris@0 56 *
Chris@0 57 * @return mixed
Chris@0 58 */
Chris@0 59 public function ignoreExceptions();
Chris@0 60
Chris@0 61 /**
Chris@0 62 * Get list of thrown exceptions
Chris@0 63 *
Chris@0 64 * @return array
Chris@0 65 */
Chris@0 66 public function getExceptions();
Chris@0 67
Chris@0 68 /**
Chris@0 69 * Set the current feed type being exported to "rss" or "atom". This allows
Chris@0 70 * other objects to gracefully choose whether to execute or not, depending
Chris@0 71 * on their appropriateness for the current type, e.g. renderers.
Chris@0 72 *
Chris@0 73 * @param string $type
Chris@0 74 */
Chris@0 75 public function setType($type);
Chris@0 76
Chris@0 77 /**
Chris@0 78 * Retrieve the current or last feed type exported.
Chris@0 79 *
Chris@0 80 * @return string Value will be "rss" or "atom"
Chris@0 81 */
Chris@0 82 public function getType();
Chris@0 83
Chris@0 84 /**
Chris@0 85 * Sets the absolute root element for the XML feed being generated. This
Chris@0 86 * helps simplify the appending of namespace declarations, but also ensures
Chris@0 87 * namespaces are added to the root element - not scattered across the entire
Chris@0 88 * XML file - may assist namespace unsafe parsers and looks pretty ;).
Chris@0 89 *
Chris@0 90 * @param DOMElement $root
Chris@0 91 */
Chris@0 92 public function setRootElement(DOMElement $root);
Chris@0 93
Chris@0 94 /**
Chris@0 95 * Retrieve the absolute root element for the XML feed being generated.
Chris@0 96 *
Chris@0 97 * @return DOMElement
Chris@0 98 */
Chris@0 99 public function getRootElement();
Chris@0 100 }