diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-01-27 04:15:53 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-01-27 04:15:53 +0100 |
commit | ae7393db3d99a7ac223ae917129cccd9f49888e3 (patch) | |
tree | 7f54b72b0d01c38afd1378365a67e4f192922423 /db/feed.php | |
parent | 483784caa38bd6131405ac474347a215584e30a5 (diff) |
merged the angularjs branch
Diffstat (limited to 'db/feed.php')
-rw-r--r-- | db/feed.php | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/db/feed.php b/db/feed.php new file mode 100644 index 000000000..0f2e861b7 --- /dev/null +++ b/db/feed.php @@ -0,0 +1,75 @@ +<?php +/** +* ownCloud - News app +* +* @author Alessandro Cosentino +* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> +* +* This file is licensed under the Affero General Public License version 3 or later. +* See the COPYING-README file +* +*/ + +namespace OCA\News; + + +/** + * This class models a feed. + */ +class Feed extends Collection { + + private $title; + private $url; + private $items; //array that contains all the items of the feed + private $favicon; + + // if $items = null, it means that feed has not been fetched yet + // if $id = null, it means that the feed has not been stored in the db yet + public function __construct($url, $title, $items = null, $id = null) { + $this->url = $url; + $this->title = $title; + if ($items !== null) { + $this->items = $items; + } + if ($id !== null) { + parent::__construct($id); + } + } + + public function getUrl() { + return $this->url; + } + + public function getTitle() { + return $this->title; + } + + public function setTitle($title) { + $this->title = $title; + } + + public function getFavicon() { + return $this->favicon; + } + + public function setFavicon($favicon) { + $this->favicon = $favicon; + } + + public function setItems($items) { + $this->items = $items; + } + + public function getItems() { + return $this->items; + } + + public function setFolderId($folderId){ + $this->folderId = $folderId; + } + + public function getFolderId(){ + return $this->folderId; + } + +} |