mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Clean up Dispatcher
This commit is contained in:
parent
946562869e
commit
dfcc9f19eb
@ -62,41 +62,40 @@ class Dispatcher extends MainApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function registerServices() {
|
public function registerServices() {
|
||||||
$appName = $this->appName;
|
|
||||||
$app = $this->app;
|
$app = $this->app;
|
||||||
|
|
||||||
$this->container->registerService('PageController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('PageController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
return new PageController($appName, $request);
|
return new PageController($this->appName, $request);
|
||||||
});
|
});
|
||||||
$this->container->registerService('AddressBookController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('AddressBookController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
return new AddressBookController($appName, $request, $app);
|
return new AddressBookController($this->appName, $request, $app);
|
||||||
});
|
});
|
||||||
$this->container->registerService('GroupController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('GroupController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
$tags = $this->server->getTagManager()->load('contact');
|
$tags = $this->server->getTagManager()->load('contact');
|
||||||
return new GroupController($this->appName, $request, $app, $tags);
|
return new GroupController($this->appName, $request, $app, $tags);
|
||||||
});
|
});
|
||||||
$this->container->registerService('ContactController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('ContactController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
return new ContactController($this->appName, $request, $app);
|
return new ContactController($this->appName, $request, $app);
|
||||||
});
|
});
|
||||||
$this->container->registerService('ContactPhotoController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('ContactPhotoController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
$cache = $this->server->getCache();
|
$cache = $this->server->getCache();
|
||||||
return new ContactPhotoController($this->appName, $request, $app, $cache);
|
return new ContactPhotoController($this->appName, $request, $app, $cache);
|
||||||
});
|
});
|
||||||
$this->container->registerService('SettingsController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('SettingsController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
return new SettingsController($this->appName, $request, $app);
|
return new SettingsController($this->appName, $request, $app);
|
||||||
});
|
});
|
||||||
$this->container->registerService('ImportController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('ImportController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
$cache = $this->server->getCache();
|
$cache = $this->server->getCache();
|
||||||
return new ImportController($this->appName, $request, $app, $cache);
|
return new ImportController($this->appName, $request, $app, $cache);
|
||||||
});
|
});
|
||||||
$this->container->registerService('ExportController', function(IAppContainer $container) use($app, $appName) {
|
$this->container->registerService('ExportController', function(IAppContainer $container) use($app) {
|
||||||
$request = $container->query('Request');
|
$request = $container->query('Request');
|
||||||
return new ExportController($this->appName, $request, $app);
|
return new ExportController($this->appName, $request, $app);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user