1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-11 16:32:55 +00:00

Create a basic SmsController

This commit is contained in:
Loïc Blot (@U-Exp)
2014-09-12 13:59:19 +02:00
parent 8d03780e6f
commit 3ad96daa21
4 changed files with 42 additions and 65 deletions
+8 -9
View File
@@ -14,7 +14,7 @@ namespace OCA\OcSms\AppInfo;
use \OCP\AppFramework\App;
use \OCA\OcSms\Controller\PageController;
use \OCA\OcSms\Controller\SmsController;
class Application extends App {
@@ -28,9 +28,10 @@ class Application extends App {
/**
* Controllers
*/
$container->registerService('PageController', function($c) {
return new PageController(
$c->query('AppName'),
$container->registerService('SmsController', function($c) {
return new SmsController(
$c->query('AppName'),
$c->query('Request'),
$c->query('UserId')
);
@@ -42,9 +43,7 @@ class Application extends App {
*/
$container->registerService('UserId', function($c) {
return \OCP\User::getUser();
});
});
}
}
}