diff options
Diffstat (limited to 'dependencyinjection/dicontainer.php')
-rw-r--r-- | dependencyinjection/dicontainer.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dependencyinjection/dicontainer.php b/dependencyinjection/dicontainer.php index 874360b9c..2dce25e17 100644 --- a/dependencyinjection/dicontainer.php +++ b/dependencyinjection/dicontainer.php @@ -27,9 +27,18 @@ namespace OCA\News\DependencyInjection; use OCA\AppFramework\DependencyInjection\DIContainer as BaseContainer; + use OCA\News\Controller\FolderController; +use OCA\News\Controller\FeedController; +use OCA\News\Controller\ItemController; + use OCA\News\Bl\FolderBl; +use OCA\News\Bl\FeedBl; +use OCA\News\Bl\ItemBl; + use OCA\News\Db\FolderMapper; +use OCA\News\Db\FeedMapper; +use OCA\News\Db\ItemMapper; class DIContainer extends BaseContainer { @@ -50,6 +59,14 @@ class DIContainer extends BaseContainer { return new FolderController($c['API'], $c['Request'], $c['FolderBl']); }); + $this['FeedController'] = $this->share(function($c){ + return new FeedController($c['API'], $c['Request'], $c['FeedBl']); + }); + + $this['ItemController'] = $this->share(function($c){ + return new ItemController($c['API'], $c['Request'], $c['ItemBl']); + }); + /** * Business */ @@ -57,6 +74,15 @@ class DIContainer extends BaseContainer { return new FolderBl($c['FolderMapper']); }); + $this['FeedBl'] = $this->share(function($c){ + return new FeedBl($c['FeedMapper']); + }); + + $this['ItemBl'] = $this->share(function($c){ + return new ItemBl($c['ItemMapper']); + }); + + /** * MAPPERS */ @@ -64,7 +90,13 @@ class DIContainer extends BaseContainer { return new FolderMapper($c['API']); }); + $this['FeedMapper'] = $this->share(function($c){ + return new FeedMapper($c['API']); + }); + $this['ItemMapper'] = $this->share(function($c){ + return new ItemMapper($c['API']); + }); } } |