KMP PHP API Reference

PlatformBackupPolicyService
in package

Reads and writes the single global backup policy (cadence + retention).

The policy is the one source of truth for how often managed tenant backups are taken, how long they are retained, and — derived from the cadence — when fleet health should flag a tenant's backups as stale.

Table of Contents

Constants

CADENCE_DAILY  : mixed = 'daily'
CADENCE_WEEKLY  : mixed = 'weekly'
FLEET_SCHEDULE_NAME  : mixed = 'tenant-backup-fleet'
SETTING_CADENCE  : mixed = 'backup.cadence'
SETTING_RETENTION_DAYS  : mixed = 'backup.retention_days'

Properties

$platformConnection  : Connection

Methods

__construct()  : mixed
Constructor.
cadence()  : string
The configured backup cadence: daily or weekly.
cadenceHours()  : int
The cadence window expressed in hours.
criticalAfterHours()  : int
Three missed cadence windows is an incident.
cronExpression()  : string
Cron expression matching the configured cadence.
retentionDays()  : int
Retention days for new backups, clamped to 1-365.
save()  : void
Persist the policy and keep the fleet backup schedule's cron in step.
warningAfterHours()  : int
A tenant's latest backup older than one cadence window deserves attention.
read()  : string|null
Read one policy setting value.
write()  : void
Upsert one policy setting value.

Constants

Properties

Methods

__construct()

Constructor.

public __construct(Connection $platformConnection) : mixed
Parameters
$platformConnection : Connection

criticalAfterHours()

Three missed cadence windows is an incident.

public criticalAfterHours() : int
Return values
int

cronExpression()

Cron expression matching the configured cadence.

public cronExpression() : string
Return values
string

save()

Persist the policy and keep the fleet backup schedule's cron in step.

public save(string $cadence, int $retentionDays) : void
Parameters
$cadence : string
$retentionDays : int

warningAfterHours()

A tenant's latest backup older than one cadence window deserves attention.

public warningAfterHours() : int
Return values
int

read()

Read one policy setting value.

private read(string $key) : string|null
Parameters
$key : string
Return values
string|null

write()

Upsert one policy setting value.

private write(Connection $connection, string $key, string $value, DateTime $now) : void
Parameters
$connection : Connection
$key : string
$value : string
$now : DateTime
On this page

Search results