ReleaseSafeguards
Corex\Config\Releases\ReleaseSafeguards · class · Config layer
What stands between visitors and a half-installed site, and the way back, raised together and for one installation (spec 107, plan D7 and D9; FR-024, FR-042). The way back is written first: an installation whose recovery file cannot be written does not hold visitors off either, because it does not start.
Public API
Section titled “Public API”__construct(ReleaseMaintenance $maintenance, ReleaseRecoveryPlugin $recovery, string $home)
Section titled “__construct(ReleaseMaintenance $maintenance, ReleaseRecoveryPlugin $recovery, string $home)”raise(string $keyHash, int $now): void
Section titled “raise(string $keyHash, int $now): void”Write the way back, then hold visitors off.
hold(string $keyHash, int $now): void
Section titled “hold(string $keyHash, int $now): void”Go on holding visitors off: WordPress stops by itself ten minutes after the time it was given, and an installation that is still bringing a network’s sites to the release is making progress, not stuck.
lower(): void
Section titled “lower(): void”Let visitors in. The way back stays for as long as there is a release to go back to.
remove(): void
Section titled “remove(): void”Let visitors in and remove the way back: there is nothing to go back to.
withdraw(string $keyHash): void
Section titled “withdraw(string $keyHash): void”Let visitors in and remove the way back of the installation whose key has this hash. One that is another’s, the installation before’s which this one did not get to write over, is left: it is still the way back to the release kept for it.
hasAWayBack(): bool
Section titled “hasAWayBack(): bool”Whether the way back that needs no admin is on the site.
link(string $key): string
Section titled “link(string $key): string”The address that puts the previous release back without the admin, for an installation’s key.