LegacyKmpBackupStorage
in package
implements
BackupArchiveStorageInterface
FinalYes
Provides bounded, path-safe access to archives created by the former .kmpbackup workflow.
Table of Contents
Interfaces
Properties
- $storage : BackupStorageService
- $workRoot : string
Methods
- __construct() : mixed
- Constructor.
- delete() : void
- Delete a stored encrypted archive.
- retrieve() : TenantBackupStoredObject
- Retrieve and verify basic metadata for an encrypted archive.
- workPath() : string
- Return an isolated local staging path for an archive.
- ensureDirectory() : void
- Create a private staging directory when needed.
- objectName() : string
- Validate a legacy object name without allowing path traversal.
Properties
$storage read-only
private
BackupStorageService
$storage
$workRoot read-only
private
string
$workRoot
= TMP . 'platform-backup-work'
Methods
__construct()
Constructor.
public
__construct(BackupStorageService $storage[, string $workRoot = TMP . 'platform-backup-work' ]) : mixed
Parameters
- $storage : BackupStorageService
- $workRoot : string = TMP . 'platform-backup-work'
delete()
Delete a stored encrypted archive.
public
delete(string $objectUri) : void
Parameters
- $objectUri : string
Tags
retrieve()
Retrieve and verify basic metadata for an encrypted archive.
public
retrieve(string $objectUri, string $destinationPath) : TenantBackupStoredObject
Parameters
- $objectUri : string
- $destinationPath : string
Tags
Return values
TenantBackupStoredObjectworkPath()
Return an isolated local staging path for an archive.
public
workPath(string $backupId, string $suffix) : string
Parameters
- $backupId : string
- $suffix : string
Tags
Return values
stringensureDirectory()
Create a private staging directory when needed.
private
ensureDirectory(string $directory) : void
Parameters
- $directory : string
objectName()
Validate a legacy object name without allowing path traversal.
private
objectName(string $objectUri) : string
Parameters
- $objectUri : string