diff options
-rw-r--r-- | bl/feedbl.php | 55 | ||||
-rw-r--r-- | bl/itembl.php | 38 |
2 files changed, 68 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; - } - + } diff --git a/bl/itembl.php b/bl/itembl.php new file mode 100644 index 000000000..5f02f69ad --- /dev/null +++ b/bl/itembl.php @@ -0,0 +1,38 @@ +<?php + +/** +* 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/>. +* +*/ + +namespace OCA\News\Bl; + +use \OCA\News\Db\Item; + + +class ItemBl extends Bl { + + public function __construct($itemMapper){ + parent::__construct($itemMapper); + } + + +} |