|
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, string|false $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. | |
Public Member Functions inherited from MediaWiki\Block\BlockTarget | |
| __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.
| |
Public Member Functions inherited from MediaWiki\DAO\WikiAwareEntity | |
| 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.
| |
Protected Member Functions inherited from MediaWiki\Block\BlockTarget | |
| __construct (string|false $wikiId) | |
Additional Inherited Members | |
Public Attributes inherited from MediaWiki\DAO\WikiAwareEntity | |
| const | LOCAL = false |
| Wiki ID value to use with instances that are defined relative to the local wiki. | |
Protected Attributes inherited from MediaWiki\Block\BlockTarget | |
| 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, |
| string|false | $wikiId = WikiAwareEntity::LOCAL ) |
Definition at line 21 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 75 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 39 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 35 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 30 of file AnonIpBlockTarget.php.
| MediaWiki\Block\AnonIpBlockTarget::getUserIdentity | ( | ) |
Get a UserIdentity associated with this target.
Implements MediaWiki\Block\BlockTargetWithUserIdentity.
Definition at line 47 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 43 of file AnonIpBlockTarget.php.
| MediaWiki\Block\AnonIpBlockTarget::toHex | ( | ) |
Get the IP address in hexadecimal form.
Definition at line 60 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 69 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 26 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 51 of file AnonIpBlockTarget.php.