KMP PHP API Reference

BackupObjectStorage
in package

FinalYes

Stores encrypted backup archives through KMP's configured Flysystem backend.

Table of Contents

Constants

URI_PREFIX  : mixed = 'backup://'

Properties

$storage  : BackupStorageService
$workRoot  : string

Methods

__construct()  : mixed
Constructor.
delete()  : void
Delete an encrypted archive from its expected scope.
retrieve()  : TenantBackupStoredObject
Retrieve an encrypted archive into a safe staging destination.
store()  : TenantBackupStoredObject
Persist an encrypted archive and remove its staging file.
workPath()  : string
Return an isolated local staging path.
assertSafeDestination()  : void
Reject invalid staging destinations.
assertSafeSegment()  : void
Reject unsafe local path segments.
ensureDirectory()  : void
Create a private staging directory when needed.
objectPathFromUri()  : string
Resolve and scope-check a backup object URI.
validatedObjectPath()  : string
Validate the configured-storage object key.

Constants

Properties

Methods

delete()

Delete an encrypted archive from its expected scope.

public delete(string $objectUri, string $expectedPrefix) : void
Parameters
$objectUri : string
$expectedPrefix : string

workPath()

Return an isolated local staging path.

public workPath(string $backupId, string $suffix) : string
Parameters
$backupId : string
$suffix : string
Return values
string

assertSafeDestination()

Reject invalid staging destinations.

private assertSafeDestination(string $path) : void
Parameters
$path : string

assertSafeSegment()

Reject unsafe local path segments.

private assertSafeSegment(string $segment, string $label) : void
Parameters
$segment : string
$label : string

ensureDirectory()

Create a private staging directory when needed.

private ensureDirectory(string $directory) : void
Parameters
$directory : string

objectPathFromUri()

Resolve and scope-check a backup object URI.

private objectPathFromUri(string $objectUri, string $expectedPrefix) : string
Parameters
$objectUri : string
$expectedPrefix : string
Return values
string

validatedObjectPath()

Validate the configured-storage object key.

private validatedObjectPath(string $objectPath) : string
Parameters
$objectPath : string
Return values
string
On this page

Search results