# FeedChannel.class.php

Go to the documentation of this file.

    00001 <?php
    00002 /***************************************************************************
    00003  *   Copyright (C) 2007 by Dmitry A. Lomash, Dmitry E. Demidov             *
    00004  *                                                                         *
    00005  *   This program is free software; you can redistribute it and/or modify  *
    00006  *   it under the terms of the GNU Lesser General Public License as        *
    00007  *   published by the Free Software Foundation; either version 3 of the    *
    00008  *   License, or (at your option) any later version.                       *
    00009  *                                                                         *
    00010  ***************************************************************************/
    00011
    00015     final class FeedChannel
    00016     {
    00017         private $title          = null;
    00018         private $link           = null;
    00019         private $description    = null;
    00020         private $feedItems      = array();
    00021
    00025         public static function create($title)
    00026         {
    00027             return new self($title);
    00028         }
    00029
    00030         public function __construct($title)
    00031         {
    00032             $this->title = $title;
    00033         }
    00034
    00035         public function getTitle()
    00036         {
    00037             return $this->title;
    00038         }
    00039
    00043         public function setTitle($title)
    00044         {
    00045             $this->title = $title;
    00046
    00047             return $this;
    00048         }
    00049
    00050         public function getDescription()
    00051         {
    00052             return $this->description;
    00053         }
    00054
    00058         public function setDescription($description)
    00059         {
    00060             $this->description = $description;
    00061
    00062             return $this;
    00063         }
    00064
    00065         public function getLink()
    00066         {
    00067             return $this->link;
    00068         }
    00069
    00073         public function setLink($link)
    00074         {
    00075             $this->link = $link;
    00076
    00077             return $this;
    00078         }
    00079
    00080         public function getFeedItems()
    00081         {
    00082             return $this->feedItems;
    00083         }
    00084
    00088         public function setFeedItems($feedItems)
    00089         {
    00090             $this->feedItems = $feedItems;
    00091
    00092             return $this;
    00093         }
    00094
    00098         public function addFeedItem(FeedItem $feedItem)
    00099         {
    00100             $this->feedItems[] = $feedItem;
    00101
    00102             return $this;
    00103         }
    00104     }
    00105 ?>