MediaWiki REL1_39
Wikimedia\WRStats\LimitCondition Class Reference

Public Member Functions

 __construct ( $limit, $window)
 
 perSecond ()
 Get the condition as a number of events per second.
 

Public Attributes

int $limit
 The maximum number of events.
 
float int $window
 The number of seconds over which the number of events may occur.
 

Detailed Description

Since
1.39
Stability: newable

Definition at line 9 of file LimitCondition.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\WRStats\LimitCondition::__construct ( $limit,
$window )
Parameters
int | float | string$limitThe maximum number of events
int | float | string$windowThe number of seconds over which the number of events may occur

Definition at line 20 of file LimitCondition.php.

References Wikimedia\WRStats\LimitCondition\$limit, and Wikimedia\WRStats\LimitCondition\$window.

Member Function Documentation

◆ perSecond()

Wikimedia\WRStats\LimitCondition::perSecond ( )

Get the condition as a number of events per second.

Returns
float|int

Definition at line 34 of file LimitCondition.php.

References Wikimedia\WRStats\LimitCondition\$window.

Member Data Documentation

◆ $limit

int Wikimedia\WRStats\LimitCondition::$limit

The maximum number of events.

Definition at line 11 of file LimitCondition.php.

Referenced by Wikimedia\WRStats\LimitCondition\__construct().

◆ $window

float int Wikimedia\WRStats\LimitCondition::$window

The number of seconds over which the number of events may occur.

Definition at line 13 of file LimitCondition.php.

Referenced by Wikimedia\WRStats\LimitCondition\__construct(), and Wikimedia\WRStats\LimitCondition\perSecond().


The documentation for this class was generated from the following file: