summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Config/CachedMountInfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Config/CachedMountInfo.php')
-rw-r--r--lib/private/Files/Config/CachedMountInfo.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/private/Files/Config/CachedMountInfo.php b/lib/private/Files/Config/CachedMountInfo.php
index e7e10cfe2af..c70dba100a4 100644
--- a/lib/private/Files/Config/CachedMountInfo.php
+++ b/lib/private/Files/Config/CachedMountInfo.php
@@ -58,6 +58,9 @@ class CachedMountInfo implements ICachedMountInfo {
*/
protected $rootInternalPath;
+ /** @var string */
+ protected $mountProvider;
+
/**
* CachedMountInfo constructor.
*
@@ -68,13 +71,25 @@ class CachedMountInfo implements ICachedMountInfo {
* @param int|null $mountId
* @param string $rootInternalPath
*/
- public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId = null, $rootInternalPath = '') {
+ public function __construct(
+ IUser $user,
+ int $storageId,
+ int $rootId,
+ string $mountPoint,
+ string $mountProvider,
+ int $mountId = null,
+ string $rootInternalPath = ''
+ ) {
$this->user = $user;
$this->storageId = $storageId;
$this->rootId = $rootId;
$this->mountPoint = $mountPoint;
$this->mountId = $mountId;
$this->rootInternalPath = $rootInternalPath;
+ if (strlen($mountProvider) > 128) {
+ throw new \Exception("Mount provider $mountProvider name exceeds the limit of 128 characters");
+ }
+ $this->mountProvider = $mountProvider;
}
/**
@@ -138,4 +153,8 @@ class CachedMountInfo implements ICachedMountInfo {
public function getRootInternalPath() {
return $this->rootInternalPath;
}
+
+ public function getMountProvider(): string {
+ return $this->mountProvider;
+ }
}