1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-08 16:36:25 +00:00

Registering ContactsManager for future use

This commit is contained in:
Ner'zhul 2014-09-29 09:22:58 +02:00
parent fdb5d4845a
commit ac2f60ae9a

View File

@ -41,15 +41,15 @@ class Application extends App {
});
/**
* Database Layer
*/
$container->registerService('Sms', function($c) {
return new Sms($c->query('ServerContainer')->getDb());
});
$container->registerService('SmsMapper', function($c) {
return new SmsMapper($c->query('ServerContainer')->getDb());
});
* Database Layer
*/
$container->registerService('Sms', function($c) {
return new Sms($c->query('ServerContainer')->getDb());
});
$container->registerService('SmsMapper', function($c) {
return new SmsMapper($c->query('ServerContainer')->getDb());
});
/**
* Core
@ -57,6 +57,13 @@ class Application extends App {
$container->registerService('UserId', function($c) {
return \OCP\User::getUser();
});
/**
* Managers
*/
$container->registerService('ContactsManager', function($c){
return $c->getServer()->getContactsManager();
});
}
}