Implements StoredObjectManager for local storage

This commit is contained in:
2024-12-19 17:09:16 +01:00
parent 1f6de3cb11
commit c1e449f48e
9 changed files with 466 additions and 11 deletions

View File

@@ -448,4 +448,12 @@ class StoredObject implements Document, TrackCreationInterface
{
return $storedObject->getDeleteAt() < $now && $storedObject->getVersions()->isEmpty();
}
/**
* Return true if it has a current version, and if the current version is encrypted.
*/
public function isEncrypted(): bool
{
return $this->hasCurrentVersion() && $this->getCurrentVersion()->isEncrypted();
}
}

View File

@@ -226,4 +226,9 @@ class StoredObjectVersion implements TrackCreationInterface
return $this;
}
public function isEncrypted(): bool
{
return ([] !== $this->getKeyInfos()) && ([] !== $this->getIv());
}
}