|
MediaWiki master
|
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. | |
A base class for classes that evaluate atomic user requirements conditions (i.e., conditions checked through {.
A main purpose for existence of this class (and subclasses) is to separate processing compound conditions from the logic to evaluate the atomic ones.
Definition at line 19 of file UserRequirementsConditionEvaluatorBase.php.
|
abstract |
Evaluates the specified condition and returns whether the condition is met.
If the condition is unsupported by this evaluator, return null.
| string | int | $conditionType | The condition type, one of constants like APCOND_AGE |
| array | $args | Array of arguments to this condition |
| UserIdentity | $user | The user against whom the condition is checked. |
| bool | $isPerformingRequest | Whether 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.