BanIpManager
class BanIpManager implements BanIpManagerInterface (View source)
Ban IP manager.
Properties
| protected Connection | $connection | The database connection used to check the IP against. |
Methods
bool
isBanned(string $ip)
Returns if this IP address is banned.
findAll()
Finds all banned IP addresses.
banIp(string $ip)
Bans an IP address.
unbanIp(string $id)
Unbans an IP address.
string|false
findById(int $ban_id)
Finds a banned IP address by its ID.
Details
__construct(Connection $connection)
Constructs a BanIpManager object.
bool
isBanned(string $ip)
Returns if this IP address is banned.
StatementInterface
findAll()
Finds all banned IP addresses.
banIp(string $ip)
Bans an IP address.
unbanIp(string $id)
Unbans an IP address.
string|false
findById(int $ban_id)
Finds a banned IP address by its ID.