Alpha Framework alpha--util--feeds
[ class tree: alpha--util--feeds ] [ index: alpha--util--feeds ] [ all elements ]

Source for file RSS2.inc

Documentation is available at RSS2.inc

  1. <?php
  2.  
  3. require_once $config->get('sysRoot').'alpha/util/feeds/AlphaFeed.inc';
  4.  
  5. /**
  6.  * 
  7.  * RSS 2.0 class for syndication
  8.  * 
  9.  * @package alpha::util::feeds
  10.  * @since 1.0
  11.  * @author John Collins <dev@alphaframework.org>
  12.  * @version $Id: RSS2.inc 1341 2011-03-17 15:02:02Z johnc $
  13.  * @license http://www.opensource.org/licenses/bsd-license.php The BSD License
  14.  * @copyright Copyright (c) 2011, John Collins (founder of Alpha Framework).
  15.  *  All rights reserved.
  16.  * 
  17.  *  <pre>
  18.  *  Redistribution and use in source and binary forms, with or
  19.  *  without modification, are permitted provided that the
  20.  *  following conditions are met:
  21.  * 
  22.  *  * Redistributions of source code must retain the above
  23.  *    copyright notice, this list of conditions and the
  24.  *    following disclaimer.
  25.  *  * Redistributions in binary form must reproduce the above
  26.  *    copyright notice, this list of conditions and the
  27.  *    following disclaimer in the documentation and/or other
  28.  *    materials provided with the distribution.
  29.  *  * Neither the name of the Alpha Framework nor the names
  30.  *    of its contributors may be used to endorse or promote
  31.  *    products derived from this software without specific
  32.  *    prior written permission.
  33.  *   
  34.  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  35.  *  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  36.  *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  37.  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  38.  *  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  39.  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  40.  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  41.  *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  42.  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  43.  *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  44.  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  45.  *  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  46.  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  47.  *  </pre>
  48.  *  
  49.  */
  50. class RSS2 extends AlphaFeed {
  51.  
  52.     /**
  53.      * The actual root tag used in each feed type
  54.      * 
  55.      * @var string 
  56.      * @since 1.0
  57.      */
  58.     protected $rootTag = '<rss version="2.0" />';    
  59.     
  60.     /**
  61.      * The constructor
  62.      * 
  63.      * @param string $BOName The classname of the BO to render a feed for.
  64.      * @param string $title The title of the feed.
  65.      * @param string $url The base URL for the feed.
  66.      * @param string $description The description of the feed.
  67.      * @param string $pubDate The publish date, only used in Atom feeds.
  68.      * @param integer $id The feed id, only used in Atom feeds.
  69.      * @param integer $limit The amount of items to render in the feed.
  70.      * @throws IllegalArguementException
  71.      * @since 1.0
  72.      */
  73.     public function __construct($BOName$title$url$description$pubDate null$id null$limit 10{
  74.         parent::__construct($BOName$title$url$description$pubDate$id$limit);
  75.         $this->docElement = $this->root;
  76.     }
  77. }
  78.  
  79. ?>

Documentation generated on Thu, 17 Mar 2011 16:44:47 +0000 by phpDocumentor 1.4.3