KMP PHP API Reference

RestoreMaintenanceMiddleware
in package
implements MiddlewareInterface

Short-circuits normal web traffic while destructive database restore is running.

Table of Contents

Interfaces

MiddlewareInterface

Methods

process()  : ResponseInterface
Block normal request handling while a restore is active.
htmlBody()  : string
restoreLogItems()  : string
Render restore log lines for the maintenance page.
shouldShowMaintenance()  : bool

Methods

process()

Block normal request handling while a restore is active.

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface

Server request

$handler : RequestHandlerInterface

Request handler

Return values
ResponseInterface

htmlBody()

private htmlBody(array<string, mixed> $status) : string
Parameters
$status : array<string, mixed>
Return values
string

restoreLogItems()

Render restore log lines for the maintenance page.

private restoreLogItems(array<string, mixed> $status) : string
Parameters
$status : array<string, mixed>
Return values
string

shouldShowMaintenance()

private shouldShowMaintenance(array<string, mixed> $status) : bool
Parameters
$status : array<string, mixed>
Return values
bool
On this page

Search results