MediaWiki master
|
A block target for a single IP address with an associated user page. More...
Inherits MediaWiki\Block\BlockTarget, MediaWiki\Block\BlockTargetWithUserPage, and MediaWiki\Block\BlockTargetWithIp.
Public Member Functions | |
__construct (string $addr, $wikiId=WikiAwareEntity::LOCAL) | |
getLogPage () | |
Get the title to be used when logging an action on this block. | |
getSpecificity () | |
Get the score of this block for purposes of choosing a more specific block, where lower is more specific. | |
getType () | |
Get one of the Block::TYPE_xxx constants associated with this target. | |
getUserIdentity () | |
Get a UserIdentity associated with this target. | |
getUserPage () | |
Get the target's user page. | |
toHex () | |
Get the IP address in hexadecimal form. | |
toHexRange () | |
Get the IP address as a hex "range" tuple, with the start and end equal. | |
toString () | |
Get the username, the IP address, range, or autoblock ID prefixed with a "#". | |
validateForCreation () | |
Check the target data against more stringent requirements imposed when a block is created from user input. | |
![]() | |
__toString () | |
equals (?BlockTarget $other) | |
Compare this object with another one. | |
getLegacyTuple () | |
Get the target and type tuple conventionally returned by BlockUtils::parseBlockTarget() | |
getWikiId () | |
Get the ID of the wiki this page belongs to. | |
![]() | |
assertWiki ( $wikiId) | |
Throws if $wikiId is different from the return value of getWikiId(). | |
Protected Member Functions | |
getLegacyUnion () | |
Get the first part of the legacy tuple. | |
![]() | |
__construct ( $wikiId) | |
Additional Inherited Members | |
![]() | |
string false | $wikiId |
A block target for a single IP address with an associated user page.
Definition at line 18 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::__construct | ( | string | $addr, |
$wikiId = WikiAwareEntity::LOCAL ) |
string | $addr | |
string | false | $wikiId |
Definition at line 25 of file AnonIpBlockTarget.php.
References MediaWiki\Block\BlockTarget\$wikiId.
|
protected |
Get the first part of the legacy tuple.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 77 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::getLogPage | ( | ) |
Get the title to be used when logging an action on this block.
For an autoblock, the title is technically invalid, with a hash character in the DB key. For a range block, the title is valid but is not a user page for a specific user.
See also getUserPage(), which exists only for subclasses which relate to a specific user with a talk page.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 42 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::getSpecificity | ( | ) |
Get the score of this block for purposes of choosing a more specific block, where lower is more specific.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 38 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::getType | ( | ) |
Get one of the Block::TYPE_xxx constants associated with this target.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 34 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::getUserIdentity | ( | ) |
Get a UserIdentity associated with this target.
Implements MediaWiki\Block\BlockTargetWithUserIdentity.
Definition at line 50 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::getUserPage | ( | ) |
Get the target's user page.
The page has an associated talk page which can be used to talk to the target.
Implements MediaWiki\Block\BlockTargetWithUserPage.
Definition at line 46 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::toHex | ( | ) |
Get the IP address in hexadecimal form.
Definition at line 63 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::toHexRange | ( | ) |
Get the IP address as a hex "range" tuple, with the start and end equal.
Implements MediaWiki\Block\BlockTargetWithIp.
Definition at line 72 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::toString | ( | ) |
Get the username, the IP address, range, or autoblock ID prefixed with a "#".
Such a string will round-trip through BlockTarget::newFromString(), giving back the same target.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 30 of file AnonIpBlockTarget.php.
MediaWiki\Block\AnonIpBlockTarget::validateForCreation | ( | ) |
Check the target data against more stringent requirements imposed when a block is created from user input.
This is in addition to the loose validation done by BlockTargetFactory::newFromString().
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 54 of file AnonIpBlockTarget.php.