blob: 0dc2eab5120ab987952e4a56b51fcf3f2315dca3 (
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
27
28
29
30
31
32
33
|
<?php
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Files_External\Config;
use OC\Files\Mount\MountPoint;
use OCA\Files_External\Lib\Auth\Password\SessionCredentials;
use OCA\Files_External\Lib\StorageConfig;
class ExternalMountPoint extends MountPoint {
public function __construct(
protected StorageConfig $storageConfig,
$storage,
$mountpoint,
$arguments = null,
$loader = null,
$mountOptions = null,
$mountId = null,
) {
parent::__construct($storage, $mountpoint, $arguments, $loader, $mountOptions, $mountId, ConfigAdapter::class);
}
public function getMountType() {
return ($this->storageConfig->getAuthMechanism() instanceof SessionCredentials) ? 'external-session' : 'external';
}
public function getStorageConfig(): StorageConfig {
return $this->storageConfig;
}
}
|