MaintenanceSubmissionGuard
Corex\Config\Operations\MaintenanceSubmissionGuard · class · Config layer
Closes public submissions while the site is in Maintenance (spec 112, User Story 3). A REST route that declares {@see PublicSubmission::MARKER} is answered 503 with Retry-After, before its permission callback and its handler run, so nothing is stored, mailed or counted against a throttle. Routes that do not declare it (sign-in, password reset, every read) are untouched, and so is every mode but Maintenance: Coming soon keeps its forms open (spec 101).
Public API
Section titled “Public API”__construct(MaintenanceDecision $decision)
Section titled “__construct(MaintenanceDecision $decision)”register(): void
Section titled “register(): void”refuse(mixed $response, array $handler): mixed
Section titled “refuse(mixed $response, array $handler): mixed”retryAfter(mixed $response): mixed
Section titled “retryAfter(mixed $response): mixed”The refusal leaves the REST server as a response carrying Retry-After, as the maintenance page does; an error cannot carry a header.