MediaWiki REL1_40
MediaWiki\Permissions\RateLimitSubject Class Reference

Represents the subject that rate limits are applied to. More...

Public Member Functions

 __construct (UserIdentity $user, ?string $ip, array $flags)
 
 getIP ()
 
 getUser ()
 
 is (string $flag)
 Checks whether the given flag applies.
 

Detailed Description

Represents the subject that rate limits are applied to.

Stability: unstable
Since
1.39

Definition at line 31 of file RateLimitSubject.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Permissions\RateLimitSubject::__construct ( UserIdentity $user,
?string $ip,
array $flags )
Access: internal
Parameters
UserIdentity$user
string | null$ip
array<string,bool>$flags

Definition at line 61 of file RateLimitSubject.php.

Member Function Documentation

◆ getIP()

MediaWiki\Permissions\RateLimitSubject::getIP ( )
Returns
string|null

Definition at line 77 of file RateLimitSubject.php.

Referenced by MediaWiki\Permissions\RateLimiter\isExempt(), and MediaWiki\Permissions\RateLimiter\limit().

◆ getUser()

MediaWiki\Permissions\RateLimitSubject::getUser ( )
Returns
UserIdentity

Definition at line 70 of file RateLimitSubject.php.

Referenced by MediaWiki\Permissions\RateLimiter\limit().

◆ is()

MediaWiki\Permissions\RateLimitSubject::is ( string $flag)

Checks whether the given flag applies.

Parameters
string$flag
Returns
bool

Definition at line 88 of file RateLimitSubject.php.

Referenced by MediaWiki\Permissions\RateLimiter\isExempt(), and MediaWiki\Permissions\RateLimiter\limit().


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