2013-08-21 02:58:15 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OC;
|
|
|
|
|
2013-08-27 01:48:18 +04:00
|
|
|
use OC\AppFramework\Utility\SimpleContainer;
|
2013-08-21 02:58:15 +04:00
|
|
|
use OCP\Core\IServerContainer;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class Server
|
|
|
|
* @package OC
|
|
|
|
*
|
|
|
|
* TODO: hookup all manager classes
|
|
|
|
*/
|
2013-08-27 01:48:18 +04:00
|
|
|
class Server extends SimpleContainer implements IServerContainer {
|
2013-08-21 02:58:15 +04:00
|
|
|
|
2013-08-27 01:48:18 +04:00
|
|
|
function __construct() {
|
|
|
|
$this->registerService('ContactsManager', function($c){
|
|
|
|
return new ContactsManager();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return \OCP\Core\Contacts\IManager
|
|
|
|
*/
|
|
|
|
function getContactsManager() {
|
|
|
|
return $this->query('ContactsManager');
|
|
|
|
}
|
2013-08-21 02:58:15 +04:00
|
|
|
}
|