diff options
author | Hendrik Leppelsack <hendrik@leppelsack.de> | 2015-06-24 12:40:48 +0300 |
---|---|---|
committer | Hendrik Leppelsack <hendrik@leppelsack.de> | 2015-06-24 12:40:48 +0300 |
commit | 4cb1ec11f498d9091b36eb15bfc8206533a305d4 (patch) | |
tree | bee585389dd2ea8d73ff5a46a63c1affaa078b31 /appinfo | |
parent | 4e781117c39d0083f6e5a63b9011faf78faf6afa (diff) | |
parent | 7361d9d77ece7a4bc5197b081ddd7dd0cd0e00e5 (diff) |
Merge pull request #203 from owncloud/services
Further work on the services
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/application.php | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/appinfo/application.php b/appinfo/application.php index e3dc7ee1..b55d820a 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -29,6 +29,9 @@ use \OCA\Tasks\Controller\ListsController; use \OCA\Tasks\Controller\SettingsController; use \OCA\Tasks\Controller\TasksController; use \OCA\Tasks\Service\TasksService; +use \OCA\Tasks\Service\ListsService; +use \OCA\Tasks\Service\CollectionsService; +use \OCA\Tasks\Service\SettingsService; class Application extends App { @@ -43,7 +46,7 @@ class Application extends App { */ $container->registerService('PageController', function($c) { return new PageController( - $c->query('AppName'), + $c->query('AppName'), $c->query('Request'), $c->query('UserId') ); @@ -51,37 +54,33 @@ class Application extends App { $container->registerService('CollectionsController', function($c) { return new CollectionsController( - $c->query('AppName'), + $c->query('AppName'), $c->query('Request'), - $c->query('UserId'), - $c->query('L10N'), - $c->query('Settings') + $c->query('CollectionsService') ); }); $container->registerService('ListsController', function($c) { return new ListsController( - $c->query('AppName'), + $c->query('AppName'), $c->query('Request'), - $c->query('UserId') + $c->query('ListsService') ); }); $container->registerService('SettingsController', function($c) { return new SettingsController( - $c->query('AppName'), + $c->query('AppName'), $c->query('Request'), - $c->query('UserId'), - $c->query('Settings') + $c->query('SettingsService') ); }); $container->registerService('TasksController', function($c) { return new TasksController( - $c->query('AppName'), + $c->query('AppName'), $c->query('Request'), - $c->query('TasksService'), - $c->query('UserId') + $c->query('TasksService') ); }); @@ -95,6 +94,28 @@ class Application extends App { ); }); + $container->registerService('ListsService', function($c) { + return new ListsService( + $c->query('UserId') + ); + }); + + $container->registerService('CollectionsService', function($c) { + return new CollectionsService( + $c->query('UserId'), + $c->query('L10N'), + $c->query('Settings'), + $c->query('AppName') + ); + }); + + $container->registerService('SettingsService', function($c) { + return new SettingsService( + $c->query('UserId'), + $c->query('Settings'), + $c->query('AppName') + ); + }); /** * Core |