diff options
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/bootstrap.php | 11 | ||||
-rw-r--r-- | appinfo/routes.php | 12 |
2 files changed, 15 insertions, 8 deletions
diff --git a/appinfo/bootstrap.php b/appinfo/bootstrap.php index 4bebf20f8..e9628979b 100644 --- a/appinfo/bootstrap.php +++ b/appinfo/bootstrap.php @@ -47,8 +47,10 @@ namespace OCA\News; \OC::$CLASSPATH['OCA\News\NewsAjaxController'] = 'apps/news/controller/news.ajax.controller.php'; \OC::$CLASSPATH['OCA\News\FolderBL'] = 'apps/news/folder.bl.php'; +\OC::$CLASSPATH['OCA\News\FeedBL'] = 'apps/news/feed.bl.php'; \OC::$CLASSPATH['OCA\News\API_Folder'] = 'apps/news/external_api/folder.php'; +\OC::$CLASSPATH['OCA\News\API_Feed'] = 'apps/news/external_api/feed.php'; /** @@ -113,9 +115,14 @@ function createDIContainer(){ /** * BUSINESS LAYER OBJECTS */ - $newsContainer['FolderBL'] = function($c){ + $newsContainer['FolderBL'] = $newsContainer->share(function($c){ return new FolderBL($c['FolderMapper']); - }; + }); + + $newsContainer['FeedBL'] = $newsContainer->share(function($c){ + return new FeedBL($c['FeedMapper']); + }); + return $newsContainer; }
\ No newline at end of file diff --git a/appinfo/routes.php b/appinfo/routes.php index 9d232819a..57b8cb02e 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -203,12 +203,12 @@ $this->create('news_ajax_importOPML', '/import')->action( /** - * External API for folders + * External API */ \OCP\API::register( - 'get', - '/news/folders', - array('OCA\News\API_Folder ', 'getAll'), - 'news', - \OC_API::USER_AUTH + 'get', '/news/feeds', array('OCA\News\API_Feed', 'getAll'), 'news', \OC_API::USER_AUTH ); + +\OCP\API::register( + 'get', '/news/folders', array('OCA\News\API_Folder', 'getAll'), 'news', \OC_API::USER_AUTH +);
\ No newline at end of file |