MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

BackupInventory

MMO\admin\monitoring · 1 symbole · générée le 30 Nov 2026

class

BackupInventory

BackupInventory.php:17

Each site's backups, on its server and on this machine, as the last run backups read them (admin.php's, BackupFiles::Inventory), one file per site in the hub's data (project/backups/{target}.json), for the pages to show without reaching any server.

class MMO\admin\monitoring\BackupInventory
Espace de noms
MMO\admin\monitoring
And the cleanup that keeps only each site's newest sets by itself: its schedule (`project/backup-cleanup.json`, off until the Settings page turns it on), which `php hub.php scheduled` follows.
$backups = new BackupInventory($hub); foreach ($backups->all() as $target => $read) {echo $target, ' ', count($read['sets']), " set(s)\n";}

Index

CLEANUPthe cleanup of a hub that never set one: off; once on, every week, the newest 7 sets kept in both places
READa site read
UNCHECKEDa site never read
UNKNOWNa site that could not be read
hub
all()
cleanup()
counts()
debugName()
fileName($target)
get($target)
getFolder()
save($target, $read, $at)Keep what was read of a site.
__construct($hub)

Constantes4

CLEANUP

the cleanup of a hub that never set one: off; once on, every week, the newest 7 sets kept in both places

const CLEANUP = […6 items]

READ

a site read

const READ = 'read'

UNCHECKED

a site never read

const UNCHECKED = 'unchecked'

UNKNOWN

a site that could not be read

const UNKNOWN = 'unknown'

Propriétés1

hub

protected MMO\admin\monitoring\Hub $hub
Type
Hub

Méthodes9

counts()

BackupInventory.php:72
function counts(): array
retournearrayint, read: int, unknown: int, unchecked: int, server: array{sets: int, size: int}, local: array{sets: int, size: int}, incomplete: int, newest: ?int, oldest: ?int, checkedAt: ?int} the sites' backups added up: incomplete the sites read without a complete set on their server, newest the most recent set of all, oldest the oldest of the sites' newest complete sets on their servers (the site longest without one), checkedAt the oldest reading (null: one never was)

fileName($target)

BackupInventory.php:101
protected function fileName(string $target): string
$targetstring
retournestringa target's file: its name, nothing that climbs out of the folder

get($target)

BackupInventory.php:50
function get(string $target): array
$targetstring
retournearraymixed> what was last read of a site: target, at (null: never), status (UNCHECKED when never), sets, others, protected, totals, error