mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-20 12:52:58 +00:00
First Commit. Datascheme is in tests
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* ownCloud - ocsms
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014
|
||||
*/
|
||||
|
||||
namespace OCA\OcSms\AppInfo;
|
||||
|
||||
|
||||
use \OCP\AppFramework\App;
|
||||
|
||||
use \OCA\OcSms\Controller\PageController;
|
||||
|
||||
|
||||
class Application extends App {
|
||||
|
||||
|
||||
public function __construct (array $urlParams=array()) {
|
||||
parent::__construct('ocsms', $urlParams);
|
||||
|
||||
$container = $this->getContainer();
|
||||
|
||||
/**
|
||||
* Controllers
|
||||
*/
|
||||
$container->registerService('PageController', function($c) {
|
||||
return new PageController(
|
||||
$c->query('AppName'),
|
||||
$c->query('Request'),
|
||||
$c->query('UserId')
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Core
|
||||
*/
|
||||
$container->registerService('UserId', function($c) {
|
||||
return \OCP\User::getUser();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user