\DevOwl\RealCookieBannerIpHandler

Handle IPs hashed correctly depending on settings.

Summary

Methods
Properties
Constants
getPluginConstantPrefix()
isFlooding()
persistIp()
getInstance()
No public properties found
FLOODING_SECONDS
FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS
No protected methods found
No protected properties found
N/A
__construct()
$me
N/A

Constants

FLOODING_SECONDS

FLOODING_SECONDS =60

FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS

FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS =255

Properties

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

Returns

string

isFlooding()

isFlooding(): boolean

Checks the current IP if it is already persisted, it avoids to flood the API all x seconds.

Returns

boolean —

Returns true if you are allowed to create a new consent

persistIp()

persistIp(string  $ip = null,boolean  $saveIp = null)

Get persistable IP for database. It also respects IP settings.

If the IP is not stored, we need to truncate the last IP block so it is annonymous.

Parameters

string $ip

Default current IP

boolean $saveIp

Determines if the return result should contain persitable ipv4 and ipv6 values, defaults to Consent > "Save IP" option

getInstance()

getInstance()

Get singleton instance.

__construct()

__construct()

C'tor.