diff options
Diffstat (limited to 'appinfo/application.php')
| -rw-r--r-- | appinfo/application.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/appinfo/application.php b/appinfo/application.php new file mode 100644 index 0000000..ecee129 --- /dev/null +++ b/appinfo/application.php @@ -0,0 +1,45 @@ +<?php +namespace OCA\Grauphel\AppInfo; +use \OCP\AppFramework\App; + +class Application extends App +{ + public function __construct(array $urlParams=array()) + { + parent::__construct('grauphel', $urlParams); + + $container = $this->getContainer(); + + /** + * Controllers + */ + $container->registerService( + 'ApiController', + function($c) { + return new \OCA\Grauphel\Controller\ApiController( + $c->query('AppName'), + $c->query('Request') + ); + } + ); + $container->registerService( + 'AccessController', + function($c) { + return new \OCA\Grauphel\Controller\AccessController( + $c->query('AppName'), + $c->query('Request') + ); + } + ); + $container->registerService( + 'OAuthController', + function($c) { + return new \OCA\Grauphel\Controller\OAuthController( + $c->query('AppName'), + $c->query('Request') + ); + } + ); + } +} +?> |
