mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-06 15:36:12 +00:00
50 lines
850 B
PHP
50 lines
850 B
PHP
<?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();
|
|
});
|
|
|
|
}
|
|
|
|
|
|
} |