2017-10-04 10:21:50 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2017-10-04 10:21:50 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2017-10-04 10:21:50 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Remote;
|
|
|
|
|
|
|
|
|
|
use OCP\Http\Client\IClientService;
|
|
|
|
|
use OCP\ICache;
|
|
|
|
|
use OCP\Remote\IInstanceFactory;
|
|
|
|
|
|
|
|
|
|
class InstanceFactory implements IInstanceFactory {
|
2025-11-17 09:32:54 -05:00
|
|
|
public function __construct(
|
|
|
|
|
private ICache $cache,
|
|
|
|
|
private IClientService $clientService,
|
|
|
|
|
) {
|
2017-10-04 10:21:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getInstance($url) {
|
|
|
|
|
return new Instance($url, $this->cache, $this->clientService);
|
|
|
|
|
}
|
|
|
|
|
}
|