. * */ /** * This class models a feed. */ class OC_News_Feed { private $url; private $id; //id of the feed in the database private $spfeed; //encapsulate a SimplePie_Core object private $items; //array that contains all the items of the feed public function __construct($url, $title, $items, $id = null){ $this->url = $url; $this->title = $title; $this->items = $items; if ($id !== null){ $this->id = $id; } } public function getId(){ return $this->id; } public function setId($id){ $this->id = $id; } public function getUrl(){ return $this->url; } public function getTitle(){ return $this->title; } public function setItems($items){ $this->items = $items; } public function getItems(){ return $this->items; } }