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