mirror of https://github.com/nextcloud/photos
Update metadata stub
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
1bc2a42286
commit
6b153326f5
|
@ -657,11 +657,18 @@ use OCP\DB\Types;
|
|||
/**
|
||||
* @method string getGroupName()
|
||||
* @method void setGroupName(string $groupName)
|
||||
* @method array getMetadata()
|
||||
* @method void setMetadata(array $metadata)
|
||||
* @method string getValue()
|
||||
* @method void setValue(string $value)
|
||||
* @see \OC\Core\Migrations\Version240000Date20220404230027
|
||||
*/
|
||||
class FileMetadata extends Entity {
|
||||
public function getDecodedValue(): array {
|
||||
return json_decode($this->getValue(), true) ?? [];
|
||||
}
|
||||
|
||||
public function setArrayAsValue(array $value): void {
|
||||
$this->setValue(json_encode($value, JSON_THROW_ON_ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue