diff options
Diffstat (limited to 'lib/private/Calendar/Room/Manager.php')
-rw-r--r-- | lib/private/Calendar/Room/Manager.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/private/Calendar/Room/Manager.php b/lib/private/Calendar/Room/Manager.php index 8664149549d..d73b52cfb16 100644 --- a/lib/private/Calendar/Room/Manager.php +++ b/lib/private/Calendar/Room/Manager.php @@ -24,9 +24,13 @@ namespace OC\Calendar\Room; use OCP\Calendar\Room\IBackend; +use OCP\IServerContainer; class Manager implements \OCP\Calendar\Room\IManager { + /** @var IServerContainer */ + private $server; + /** @var string[] holds all registered resource backends */ private $backends = []; @@ -34,6 +38,15 @@ class Manager implements \OCP\Calendar\Room\IManager { private $initializedBackends = []; /** + * Manager constructor. + * + * @param IServerContainer $server + */ + public function __construct(IServerContainer $server) { + $this->server = $server; + } + + /** * Registers a resource backend * * @param string $backendClass @@ -66,7 +79,7 @@ class Manager implements \OCP\Calendar\Room\IManager { continue; } - $this->initializedBackends[$backend] = \OC::$server->query($backend); + $this->initializedBackends[$backend] = $this->server->query($backend); } return array_values($this->initializedBackends); |