class UserFloodEvent extends Event (View source)

Provides a user flood event for event listeners.

Properties

protected string $name

Flood event name.

protected int $threshold

Flood event threshold.

protected int $window

Flood event window.

protected string $identifier

Flood event identifier.

protected int $uid

Flood event uid.

protected string $ip

Flood event IP.

Methods

__construct(string $name, int $threshold, int $window, string $identifier)

Constructs a user flood event object.

string
getName()

Gets the name of the user flood event object.

int
getThreshold()

Gets the threshold for the user flood event object.

int
getWindow()

Gets the window for the user flood event object.

string
getIdentifier()

Gets the identifier of the user flood event object.

string
getIp()

Gets the IP of the user flood event object.

int
getUid()

Gets the uid of the user flood event object.

bool
hasIp()

Is the user flood event associated with an IP?

bool
hasUid()

Is the user flood event associated with a uid?

Details

__construct(string $name, int $threshold, int $window, string $identifier)

Constructs a user flood event object.

Parameters

string $name

The name of the flood event.

int $threshold

The threshold for the flood event.

int $window

The window for the flood event.

string $identifier

The identifier of the flood event.

string getName()

Gets the name of the user flood event object.

Return Value

string

The name of the flood event.

int getThreshold()

Gets the threshold for the user flood event object.

Return Value

int

The threshold for the flood event.

int getWindow()

Gets the window for the user flood event object.

Return Value

int

The window for the flood event.

string getIdentifier()

Gets the identifier of the user flood event object.

Return Value

string

The identifier of the flood event.

string getIp()

Gets the IP of the user flood event object.

Return Value

string

The IP of the flood event.

int getUid()

Gets the uid of the user flood event object.

Return Value

int

The uid of the flood event.

bool hasIp()

Is the user flood event associated with an IP?

Return Value

bool

Whether the event has an IP.

bool hasUid()

Is the user flood event associated with a uid?

Return Value

bool

Whether the event has a uid.