web/lib/Zend/Feed/Writer/Feed.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    12  * obtain it through the world-wide-web, please send an email
    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.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Feed_Writer
    16  * @package    Zend_Feed_Writer
    17  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @version    $Id: Feed.php 20518 2010-01-22 14:00:30Z padraic $
    19  * @version    $Id: Feed.php 24593 2012-01-05 20:35:02Z matthew $
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * @see Zend_Date
    23  * @see Zend_Date
    24  */
    24  */
    57 require_once 'Zend/Feed/Writer/Feed/FeedAbstract.php';
    57 require_once 'Zend/Feed/Writer/Feed/FeedAbstract.php';
    58 
    58 
    59 /**
    59 /**
    60  * @category   Zend
    60  * @category   Zend
    61  * @package    Zend_Feed_Writer
    61  * @package    Zend_Feed_Writer
    62  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    62  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    63  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    63  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    64  */
    64  */
    65 class Zend_Feed_Writer_Feed extends Zend_Feed_Writer_Feed_FeedAbstract
    65 class Zend_Feed_Writer_Feed extends Zend_Feed_Writer_Feed_FeedAbstract
    66 implements Iterator, Countable
    66 implements Iterator, Countable
    67 {
    67 {
   105      */
   105      */
   106     public function addTombstone(Zend_Feed_Writer_Deleted $deleted)
   106     public function addTombstone(Zend_Feed_Writer_Deleted $deleted)
   107     {
   107     {
   108         $this->_entries[] = $deleted;
   108         $this->_entries[] = $deleted;
   109     }
   109     }
   110     
   110 
   111     /**
   111     /**
   112      * Creates a new Zend_Feed_Writer_Deleted data container for use. This is NOT
   112      * Creates a new Zend_Feed_Writer_Deleted data container for use. This is NOT
   113      * added to the current feed automatically, but is necessary to create a
   113      * added to the current feed automatically, but is necessary to create a
   114      * container with some initial values preset based on the current feed data.
   114      * container with some initial values preset based on the current feed data.
   115      *
   115      *
   203     public function count()
   203     public function count()
   204     {
   204     {
   205         return count($this->_entries);
   205         return count($this->_entries);
   206     }
   206     }
   207 
   207 
   208 	/**
   208     /**
   209      * Return the current entry
   209      * Return the current entry
   210      *
   210      *
   211      * @return Zend_Feed_Reader_Entry_Interface
   211      * @return Zend_Feed_Reader_Entry_Interface
   212      */
   212      */
   213     public function current()
   213     public function current()
   223     public function key()
   223     public function key()
   224     {
   224     {
   225         return $this->_entriesKey;
   225         return $this->_entriesKey;
   226     }
   226     }
   227 
   227 
   228 	/**
   228     /**
   229      * Move the feed pointer forward
   229      * Move the feed pointer forward
   230      *
   230      *
   231      * @return void
   231      * @return void
   232      */
   232      */
   233     public function next()
   233     public function next()
   256     }
   256     }
   257 
   257 
   258     /**
   258     /**
   259      * Attempt to build and return the feed resulting from the data set
   259      * Attempt to build and return the feed resulting from the data set
   260      *
   260      *
   261      * @param $type The feed type "rss" or "atom" to export as
   261      * @param string $type             The feed type "rss" or "atom" to export as
       
   262 		 * @param bool   $ignoreExceptions
   262      * @return string
   263      * @return string
   263      */
   264      */
   264     public function export($type, $ignoreExceptions = false)
   265     public function export($type, $ignoreExceptions = false)
   265     {
   266     {
   266         $this->setType(strtolower($type));
   267         $this->setType(strtolower($type));