diff options
Diffstat (limited to 'lib/private/Remote/InstanceFactory.php')
-rw-r--r-- | lib/private/Remote/InstanceFactory.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/private/Remote/InstanceFactory.php b/lib/private/Remote/InstanceFactory.php new file mode 100644 index 00000000000..f1b7a1de4ba --- /dev/null +++ b/lib/private/Remote/InstanceFactory.php @@ -0,0 +1,27 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OC\Remote; + +use OCP\Http\Client\IClientService; +use OCP\ICache; +use OCP\Remote\IInstanceFactory; + +class InstanceFactory implements IInstanceFactory { + /** @var ICache */ + private $cache; + /** @var IClientService */ + private $clientService; + + public function __construct(ICache $cache, IClientService $clientService) { + $this->cache = $cache; + $this->clientService = $clientService; + } + + public function getInstance($url) { + return new Instance($url, $this->cache, $this->clientService); + } +} |