2020-07-30 16:09:19 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2020-08-24 08:54:25 -04:00
|
|
|
|
2020-07-30 16:09:19 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2020-07-30 16:09:19 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Files\ObjectStore;
|
|
|
|
|
|
|
|
|
|
class AppdataPreviewObjectStoreStorage extends ObjectStoreStorage {
|
2023-10-20 03:08:08 -04:00
|
|
|
private string $internalId;
|
2020-07-30 16:09:19 -04:00
|
|
|
|
2023-10-20 03:08:08 -04:00
|
|
|
/**
|
|
|
|
|
* @param array $params
|
|
|
|
|
* @throws \Exception
|
|
|
|
|
*/
|
2020-07-30 16:09:19 -04:00
|
|
|
public function __construct($params) {
|
|
|
|
|
if (!isset($params['internal-id'])) {
|
|
|
|
|
throw new \Exception('missing id in parameters');
|
|
|
|
|
}
|
|
|
|
|
$this->internalId = (string)$params['internal-id'];
|
|
|
|
|
parent::__construct($params);
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-20 03:08:08 -04:00
|
|
|
public function getId(): string {
|
2020-07-30 16:09:19 -04:00
|
|
|
return 'object::appdata::preview:' . $this->internalId;
|
|
|
|
|
}
|
|
|
|
|
}
|