IPFilter
extends IPFilter
in package
Class created by Core/Internal/PluginsDeploy
Table of Contents
Constants
- BAN_SECONDS = 600
- The number of seconds the system blocks access.
- MAX_ATTEMPTS = 5
- Maximum number of access attempts.
Methods
- __construct() : mixed
- IPFilter constructor.
- clear() : void
- Clean the list of IP addresses and save the data.
- isBanned() : bool
- Returns true if attempts to access from the IP address exceed the MAX_ATTEMPTS limit.
- setAttempt() : void
- Add or increase the attempt counter of the provided IP address.
Constants
BAN_SECONDS
The number of seconds the system blocks access.
public
mixed
BAN_SECONDS
= 600
MAX_ATTEMPTS
Maximum number of access attempts.
public
mixed
MAX_ATTEMPTS
= 5
Methods
__construct()
IPFilter constructor.
public
__construct() : mixed
clear()
Clean the list of IP addresses and save the data.
public
clear() : void
isBanned()
Returns true if attempts to access from the IP address exceed the MAX_ATTEMPTS limit.
public
isBanned(string $ip) : bool
Parameters
- $ip : string
Return values
boolsetAttempt()
Add or increase the attempt counter of the provided IP address.
public
setAttempt(string $ip) : void
Parameters
- $ip : string