wip
[grauphel.git] / appinfo / application.php
1 <?php
2 namespace OCA\Grauphel\AppInfo;
3 use \OCP\AppFramework\App;
4
5 class Application extends App
6 {
7     public function __construct(array $urlParams=array())
8     {
9         parent::__construct('grauphel', $urlParams);
10
11         $container = $this->getContainer();
12
13         /**
14          * Controllers
15          */
16         $container->registerService(
17            'ApiController',
18             function($c) {
19                 return new \OCA\Grauphel\Controller\ApiController(
20                     $c->query('AppName'),
21                     $c->query('Request')
22                 );
23             }
24         );
25         $container->registerService(
26            'AccessController',
27             function($c) {
28                  return new \OCA\Grauphel\Controller\AccessController(
29                     $c->query('AppName'),
30                     $c->query('Request')
31                 );
32             }
33         );
34         $container->registerService(
35            'OAuthController',
36             function($c) {
37                 return new \OCA\Grauphel\Controller\OAuthController(
38                     $c->query('AppName'),
39                     $c->query('Request')
40                 );
41             }
42         );
43     }
44 }
45 ?>