nextcloud/lib/server.php

41 lines
820 B
PHP
Raw Normal View History

2013-08-21 02:58:15 +04:00
<?php
namespace OC;
use OC\AppFramework\Utility\SimpleContainer;
use OCP\IServerContainer;
2013-08-21 02:58:15 +04:00
/**
* Class Server
* @package OC
*
* TODO: hookup all manager classes
*/
class Server extends SimpleContainer implements IServerContainer {
2013-08-21 02:58:15 +04:00
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');
}
2013-08-21 02:58:15 +04:00
}