|
MediaWiki REL1_39
|
Backend class for blocking utils. More...
Public Member Functions | |
| __construct (ServiceOptions $options, UserIdentityLookup $userIdentityLookup, UserNameUtils $userNameUtils) | |
| parseBlockTarget ( $target) | |
| From an existing block, get the target and the type of target. | |
| validateTarget ( $value) | |
| Validate block target. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Backend class for blocking utils.
This service should contain any methods that are useful to more than one blocking-related class and doesn't fit any other service.
For now, this includes only
Definition at line 46 of file BlockUtils.php.
| MediaWiki\Block\BlockUtils::__construct | ( | ServiceOptions | $options, |
| UserIdentityLookup | $userIdentityLookup, | ||
| UserNameUtils | $userNameUtils ) |
| ServiceOptions | $options | |
| UserIdentityLookup | $userIdentityLookup | |
| UserNameUtils | $userNameUtils |
Definition at line 68 of file BlockUtils.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
| MediaWiki\Block\BlockUtils::parseBlockTarget | ( | $target | ) |
From an existing block, get the target and the type of target.
Note that, except for null, it is always safe to treat the target as a string; for UserIdentityValue objects this will return UserIdentityValue::__toString() which in turn gives UserIdentityValue::getName().
If the type is not null, it will be an AbstractBlock::TYPE_ constant.
| string | UserIdentity | null | $target |
Definition at line 92 of file BlockUtils.php.
References MediaWiki\Block\Block\TYPE_IP, and MediaWiki\Block\Block\TYPE_USER.
Referenced by MediaWiki\Block\BlockPermissionChecker\__construct().
| MediaWiki\Block\BlockUtils::validateTarget | ( | $value | ) |
Validate block target.
| string | UserIdentity | $value |
Definition at line 156 of file BlockUtils.php.
| const MediaWiki\Block\BlockUtils::CONSTRUCTOR_OPTIONS |
Definition at line 59 of file BlockUtils.php.