77 lines
1.9 KiB
PHP
77 lines
1.9 KiB
PHP
<?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(),
|
|
$c->getServer()->getShareManager(),
|
|
$c->getServer()->getAppManager()
|
|
);
|
|
}
|
|
);
|
|
|
|
$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')),
|
|
$c->query('ServerContainer')->getConfig(),
|
|
$c->getServer()->getAppManager()
|
|
);
|
|
}
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|