From d3a313f192c090d026bac1fd1a8aed718d54c634 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 8 Nov 2023 12:35:01 +0100 Subject: Support getting and setting metadata in DAV requests Signed-off-by: Louis Chemineau --- lib/private/FilesMetadata/Model/FilesMetadata.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/private/FilesMetadata/Model') diff --git a/lib/private/FilesMetadata/Model/FilesMetadata.php b/lib/private/FilesMetadata/Model/FilesMetadata.php index a94c7a9b6ff..b10de55579c 100644 --- a/lib/private/FilesMetadata/Model/FilesMetadata.php +++ b/lib/private/FilesMetadata/Model/FilesMetadata.php @@ -133,7 +133,7 @@ class FilesMetadata implements IFilesMetadata { * @throws FilesMetadataTypeException * @since 28.0.0 */ - public function get(string $key): string { + public function getString(string $key): string { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); } @@ -276,10 +276,10 @@ class FilesMetadata implements IFilesMetadata { * @throws FilesMetadataKeyFormatException * @since 28.0.0 */ - public function set(string $key, string $value, bool $index = false): IFilesMetadata { + public function setString(string $key, string $value, bool $index = false): IFilesMetadata { $this->confirmKeyFormat($key); try { - if ($this->get($key) === $value && $index === $this->isIndex($key)) { + if ($this->getString($key) === $value && $index === $this->isIndex($key)) { return $this; // we ignore if value and index have not changed } } catch (FilesMetadataNotFoundException|FilesMetadataTypeException $e) { @@ -506,7 +506,7 @@ class FilesMetadata implements IFilesMetadata { return; } - throw new FilesMetadataKeyFormatException('key can only contains alphanumerical characters, and dash (-)'); + throw new FilesMetadataKeyFormatException('key can only contains alphanumerical characters, and dash (-, _)'); } /** -- cgit v1.2.3