MediaWiki master
|
A block target of the form #1234 where the number is the block ID. More...
Inherits MediaWiki\Block\BlockTarget.
Public Member Functions | |
__construct (int $id, $wikiId=WikiAwareEntity::LOCAL) | |
getId () | |
Get the block ID. | |
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. | |
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 of the form #1234 where the number is the block ID.
For user input or display when the IP address needs to be hidden.
Definition at line 16 of file AutoBlockTarget.php.
MediaWiki\Block\AutoBlockTarget::__construct | ( | int | $id, |
$wikiId = WikiAwareEntity::LOCAL ) |
int | $id | The block ID |
string | false | $wikiId |
Definition at line 23 of file AutoBlockTarget.php.
References MediaWiki\Block\BlockTarget\$wikiId.
MediaWiki\Block\AutoBlockTarget::getId | ( | ) |
|
protected |
Get the first part of the legacy tuple.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 58 of file AutoBlockTarget.php.
MediaWiki\Block\AutoBlockTarget::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 36 of file AutoBlockTarget.php.
MediaWiki\Block\AutoBlockTarget::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 40 of file AutoBlockTarget.php.
MediaWiki\Block\AutoBlockTarget::getType | ( | ) |
Get one of the Block::TYPE_xxx constants associated with this target.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 32 of file AutoBlockTarget.php.
MediaWiki\Block\AutoBlockTarget::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 28 of file AutoBlockTarget.php.
MediaWiki\Block\AutoBlockTarget::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 44 of file AutoBlockTarget.php.