blob: f3047b851b2bf06dcb3dc0dd4841be97715f627d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?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);
}
}
|