|
MediaWiki master
|
Inherits MediaWiki\User\UserRequirementsConditionEvaluatorBase.

Public Member Functions | |||||||||||||
| __construct (private readonly ServiceOptions $options, private readonly GroupPermissionsLookup $groupPermissionsLookup, private readonly UserEditTracker $userEditTracker, private readonly UserRegistrationLookup $userRegistrationLookup, private readonly UserFactory $userFactory, private readonly IContextSource $context, private readonly UserGroupManager $userGroupManager,) | |||||||||||||
| checkCondition (string|int $conditionType, array $args, UserIdentity $user, bool $isPerformingRequest) | |||||||||||||
Evaluates the specified condition and returns whether the condition is met.If the condition is unsupported by this evaluator, return null.
| |||||||||||||
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Definition at line 21 of file UserRequirementsConditionEvaluator.php.
| MediaWiki\User\UserRequirementsConditionEvaluator::__construct | ( | private readonly ServiceOptions | $options, |
| private readonly GroupPermissionsLookup | $groupPermissionsLookup, | ||
| private readonly UserEditTracker | $userEditTracker, | ||
| private readonly UserRegistrationLookup | $userRegistrationLookup, | ||
| private readonly UserFactory | $userFactory, | ||
| private readonly IContextSource | $context, | ||
| private readonly UserGroupManager | $userGroupManager ) |
Definition at line 37 of file UserRequirementsConditionEvaluator.php.
| MediaWiki\User\UserRequirementsConditionEvaluator::checkCondition | ( | string|int | $conditionType, |
| array | $args, | ||
| UserIdentity | $user, | ||
| bool | $isPerformingRequest ) |
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 from MediaWiki\User\UserRequirementsConditionEvaluatorBase.
Definition at line 50 of file UserRequirementsConditionEvaluator.php.
References APCOND_AGE, APCOND_AGE_FROM_EDIT, APCOND_BLOCKED, APCOND_EDITCOUNT, APCOND_EMAILCONFIRMED, APCOND_INGROUPS, APCOND_IPINRANGE, APCOND_ISBOT, APCOND_ISIP, MediaWiki\MainConfigNames\AutoConfirmAge, MediaWiki\MainConfigNames\AutoConfirmCount, MediaWiki\MainConfigNames\EmailAuthentication, and wfTimestampOrNull().
| const MediaWiki\User\UserRequirementsConditionEvaluator::CONSTRUCTOR_OPTIONS |
Definition at line 24 of file UserRequirementsConditionEvaluator.php.
Referenced by MediaWiki\User\UserRequirementsConditionCheckerFactory\__construct().