diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-21 13:17:58 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-21 13:17:58 +0100 |
commit | 2452dfa4015ed2a6fc9b70d897ba6ca7da009193 (patch) | |
tree | 6bcd69692ed3d8230cc28f305e896de6a481af8c /bl/feedbl.php | |
parent | 39d3bc61d81eae92d9615e898bc6dd6b658d71a6 (diff) |
added businesslayer files
Diffstat (limited to 'bl/feedbl.php')
-rw-r--r-- | bl/feedbl.php | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/bl/feedbl.php b/bl/feedbl.php index 43e0faf6f..14182814e 100644 --- a/bl/feedbl.php +++ b/bl/feedbl.php @@ -1,33 +1,38 @@ <?php -namespace OCA\News; +/** +* ownCloud - News +* +* @author Alessandro Cosentino +* @author Bernhard Posselt +* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ -class FeedBl { +namespace OCA\News\Bl; + +use \OCA\News\Db\Feed; + + +class FeedBl extends Bl { public function __construct($feedMapper){ - $this->feedMapper = $feedMapper; - } - - public function getAll() { - return $this->feedMapper->findAll(); - } - - public function getById($feedid) { - return $this->feedMapper->findById($feedid); - } - - public function delete($feedid) { - return $this->feedMapper->deleteById($feedid); + parent::__construct($feedMapper); } - public function create($url, $folderid) { - $feed = new Feed($url); - $this->feedMapper->save($feed, $folderid); - $feed = Utils::fetch($url); - if ($feed != null) { - $this->feedMapper->save($feed, $folderid); - } - return true; - } - + } |