Neuron-PHP

MaintenanceFilter extends Filter
in package

Route filter that intercepts requests during maintenance mode.

Table of Contents

Properties

$_customView  : string|null
$_manager  : MaintenanceManager
$_postFn  : Closure|null
$_preFn  : Closure|null

Methods

__construct()  : mixed
post()  : mixed|null
pre()  : mixed|null
checkMaintenance()  : mixed|null
Check if site is in maintenance mode and handle accordingly
containsDirectoryTraversal()  : bool
Check if a path contains directory traversal patterns
getClientIp()  : string
Get the client's IP address
getDefaultMaintenancePage()  : string
Get default maintenance page HTML
renderMaintenancePage()  : string
Render the maintenance mode page

Properties

$_postFn

private Closure|null $_postFn

$_preFn

private Closure|null $_preFn

Methods

checkMaintenance()

Check if site is in maintenance mode and handle accordingly

private checkMaintenance(RouteMap $route) : mixed|null
Parameters
$route : RouteMap
Return values
mixed|null

Returns maintenance page or null to continue

containsDirectoryTraversal()

Check if a path contains directory traversal patterns

private containsDirectoryTraversal(string $path) : bool
Parameters
$path : string

Path to validate

Return values
bool

True if directory traversal detected

getClientIp()

Get the client's IP address

private getClientIp() : string
Return values
string

getDefaultMaintenancePage()

Get default maintenance page HTML

private getDefaultMaintenancePage() : string
Return values
string

renderMaintenancePage()

Render the maintenance mode page

private renderMaintenancePage() : string
Return values
string

        
On this page

Search results