File indexing completed on 2025-01-19 05:21:06

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Feed_Writer
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0019  * @version    $Id$
0020  */
0021 
0022 /**
0023  * @category   Zend
0024  * @package    Zend_Feed_Writer
0025  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0026  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0027  */
0028 interface Zend_Feed_Writer_Renderer_RendererInterface
0029 {
0030     /**
0031      * Render feed/entry
0032      *
0033      * @return void
0034      */
0035     public function render();
0036 
0037     /**
0038      * Save feed and/or entry to XML and return string
0039      *
0040      * @return string
0041      */
0042     public function saveXml();
0043 
0044     /**
0045      * Get DOM document
0046      *
0047      * @return DOMDocument
0048      */
0049     public function getDomDocument();
0050 
0051     /**
0052      * Get document element from DOM
0053      *
0054      * @return DOMElement
0055      */
0056     public function getElement();
0057 
0058     /**
0059      * Get data container containing feed items
0060      *
0061      * @return mixed
0062      */
0063     public function getDataContainer();
0064 
0065     /**
0066      * Should exceptions be ignored?
0067      *
0068      * @return mixed
0069      */
0070     public function ignoreExceptions();
0071 
0072     /**
0073      * Get list of thrown exceptions
0074      *
0075      * @return array
0076      */
0077     public function getExceptions();
0078 
0079     /**
0080      * Set the current feed type being exported to "rss" or "atom". This allows
0081      * other objects to gracefully choose whether to execute or not, depending
0082      * on their appropriateness for the current type, e.g. renderers.
0083      *
0084      * @param string $type
0085      */
0086     public function setType($type);
0087 
0088     /**
0089      * Retrieve the current or last feed type exported.
0090      *
0091      * @return string Value will be "rss" or "atom"
0092      */
0093     public function getType();
0094 
0095     /**
0096      * Sets the absolute root element for the XML feed being generated. This
0097      * helps simplify the appending of namespace declarations, but also ensures
0098      * namespaces are added to the root element - not scattered across the entire
0099      * XML file - may assist namespace unsafe parsers and looks pretty ;).
0100      *
0101      * @param DOMElement $root
0102      */
0103     public function setRootElement(DOMElement $root);
0104 
0105     /**
0106      * Retrieve the absolute root element for the XML feed being generated.
0107      *
0108      * @return DOMElement
0109      */
0110     public function getRootElement();
0111 }