40 lines
820 B
PHP
40 lines
820 B
PHP
<?php
|
|
|
|
namespace OC;
|
|
|
|
use OC\AppFramework\Utility\SimpleContainer;
|
|
use OCP\IServerContainer;
|
|
|
|
/**
|
|
* Class Server
|
|
* @package OC
|
|
*
|
|
* TODO: hookup all manager classes
|
|
*/
|
|
class Server extends SimpleContainer implements IServerContainer {
|
|
|
|
function __construct() {
|
|
$this->registerService('ContactsManager', function($c){
|
|
return new ContactsManager();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @return \OCP\Contacts\IManager
|
|
*/
|
|
function getContactsManager() {
|
|
return $this->query('ContactsManager');
|
|
}
|
|
|
|
/**
|
|
* The current request object holding all information about the request currently being processed
|
|
* is returned from this method.
|
|
* In case the current execution was not initiated by a web request null is returned
|
|
*
|
|
* @return \OCP\IRequest|null
|
|
*/
|
|
function getRequest()
|
|
{
|
|
return $this->query('Request');
|
|
}
|
|
}
|