Documentation

IpHandler
in package
Uses UtilsProvider

Handle IPs hashed correctly depending on settings.

Table of Contents

Constants

FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS  = 255
FLOODING_SECONDS  = 60

Properties

$me  : IpHandler
Singleton instance.

Methods

getInstance()  : mixed
Get singleton instance.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
isFlooding()  : bool
Checks the current IP if it is already persisted, it avoids to flood the API all x seconds.
persistIp()  : mixed
Get persistable IP for database. It also respects IP settings.
__construct()  : mixed
C'tor.

Constants

FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS

public mixed FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS = 255

FLOODING_SECONDS

public mixed FLOODING_SECONDS = 60

Properties

Methods

getInstance()

Get singleton instance.

public static getInstance() : mixed
Tags
codeCoverageIgnore

getPluginConstantPrefix()

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

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

isFlooding()

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

public isFlooding() : bool
Return values
bool

Returns true if you are allowed to create a new consent

persistIp()

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

public persistIp([string $ip = null ][, bool $saveIp = null ]) : mixed

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

Parameters
$ip : string = null

Default current IP

$saveIp : bool = null

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

Tags
see
https://www.onlinemarketingrecht.de/2017/09/ip-adressen-anonymisieren-wann-wie-und-warum/

__construct()

C'tor.

private __construct() : mixed

        
On this page

Search results