MediaWiki master
MediaWiki\User\UserRequirementsConditionEvaluatorBase Class Reference

A base class for classes that evaluate atomic user requirements conditions (i.e., conditions checked through {. More...

Inherited by MediaWiki\User\UserRequirementsConditionEvaluator.

Public Member Functions

 checkCondition (string|int $conditionType, array $args, UserIdentity $user, bool $isPerformingRequest)
 Evaluates the specified condition and returns whether the condition is met.
 

Detailed Description

A base class for classes that evaluate atomic user requirements conditions (i.e., conditions checked through {.

See also
UserRequirementsConditionChecker}).

A main purpose for existence of this class (and subclasses) is to separate processing compound conditions from the logic to evaluate the atomic ones.

Since
1.46
Stability: stable
to extend

Definition at line 19 of file UserRequirementsConditionEvaluatorBase.php.

Member Function Documentation

◆ checkCondition()

MediaWiki\User\UserRequirementsConditionEvaluatorBase::checkCondition ( string|int $conditionType,
array $args,
UserIdentity $user,
bool $isPerformingRequest )
abstract

Evaluates the specified condition and returns whether the condition is met.

If the condition is unsupported by this evaluator, return null.

Parameters
string | int$conditionTypeThe condition type, one of constants like APCOND_AGE
array$argsArray of arguments to this condition
UserIdentity$userThe user against whom the condition is checked.
bool$isPerformingRequestWhether the checked user is the one who performs current request. If this value is false, the implementation should only perform checks that make sense against users at rest (e.g., no current IP checks). For other checks a reasonable default value should be returned.

Reimplemented in MediaWiki\User\UserRequirementsConditionEvaluator.


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