|
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, string|false $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. | |
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 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, |
| string|false | $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 60 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 41 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 45 of file AutoBlockTarget.php.