summaryrefslogtreecommitdiffstats
path: root/dependencyinjection
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 01:44:12 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 22:52:26 +0200
commit21bd539847f33c3889c4f58f14afd672f54a410a (patch)
treed6ff27e38727197b60d1c2c47968b7f64d4f5c2f /dependencyinjection
parentfcef0800a24818305e8a52761b05f87e13206689 (diff)
ported to owncloud internal appframework classes, confused with how to start the app and define deps
Diffstat (limited to 'dependencyinjection')
-rw-r--r--dependencyinjection/dicontainer.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/dependencyinjection/dicontainer.php b/dependencyinjection/dicontainer.php
index b34c17a3c..377b0f376 100644
--- a/dependencyinjection/dicontainer.php
+++ b/dependencyinjection/dicontainer.php
@@ -30,6 +30,8 @@ use \OC\Files\View;
use \OCA\AppFramework\DependencyInjection\DIContainer as BaseContainer;
use \OCA\AppFramework\Middleware\MiddlewareDispatcher;
+use \OCA\News\Core\API;
+
use \OCA\News\Controller\PageController;
use \OCA\News\Controller\FolderController;
use \OCA\News\Controller\FeedController;
@@ -83,6 +85,10 @@ class DIContainer extends BaseContainer {
// tell parent container about the app name
parent::__construct('news');
+ $this['API'] = $this->share(function($c){
+ return new API($c['news']);
+ });
+
/**
* Configuration values
*/