2016-11-30 19:00:03 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* ownCloud - gpxedit
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author
|
|
|
|
*
|
|
|
|
* @copyright
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCA\GpxEdit\AppInfo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use OCP\IContainer;
|
|
|
|
|
|
|
|
use OCP\AppFramework\App;
|
|
|
|
use OCP\AppFramework\IAppContainer;
|
|
|
|
|
|
|
|
use OCA\GpxEdit\Controller\PageController;
|
|
|
|
use OCA\GpxEdit\Controller\ComparisonController;
|
|
|
|
use OCA\GpxEdit\Controller\UtilsController;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class Application
|
|
|
|
*
|
|
|
|
* @package OCA\GpxEdit\AppInfo
|
|
|
|
*/
|
|
|
|
class Application extends App {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*
|
|
|
|
* @param array $urlParams
|
|
|
|
*/
|
|
|
|
public function __construct(array $urlParams = []) {
|
|
|
|
parent::__construct('gpxedit', $urlParams);
|
|
|
|
|
|
|
|
$container = $this->getContainer();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Controllers
|
|
|
|
*/
|
|
|
|
$container->registerService(
|
|
|
|
'PageController', function (IAppContainer $c) {
|
|
|
|
return new PageController(
|
|
|
|
$c->query('AppName'),
|
|
|
|
$c->query('Request'),
|
|
|
|
$c->query('UserId'),
|
|
|
|
$c->query('ServerContainer')->getUserFolder($c->query('UserId')),
|
|
|
|
$c->query('ServerContainer')->getConfig(),
|
2017-03-17 23:16:12 +00:00
|
|
|
$c->getServer()->getShareManager(),
|
|
|
|
$c->getServer()->getAppManager()
|
2016-11-30 19:00:03 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
$container->registerService(
|
|
|
|
'UtilsController', function (IAppContainer $c) {
|
|
|
|
return new UtilsController(
|
|
|
|
$c->query('AppName'),
|
|
|
|
$c->query('Request'),
|
|
|
|
$c->query('UserId'),
|
|
|
|
//$c->getServer()->getUserFolder($c->query('UserId')),
|
|
|
|
//$c->query('OCP\IConfig'),
|
|
|
|
$c->query('ServerContainer')->getUserFolder($c->query('UserId')),
|
2017-03-17 23:16:12 +00:00
|
|
|
$c->query('ServerContainer')->getConfig(),
|
|
|
|
$c->getServer()->getAppManager()
|
2016-11-30 19:00:03 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|