|
MediaWiki master
|
Inherits MediaWiki\Block\Restriction\AbstractRestriction.

Public Member Functions | ||||
| matches (Title $title) | ||||
Determine if a restriction matches a given title.
| ||||
Public Member Functions inherited from MediaWiki\Block\Restriction\AbstractRestriction | ||||
| __construct ( $blockId, $value) | ||||
| Create Restriction. | ||||
| equals (Restriction $other) | ||||
Determine if a restriction equals another restriction.
| ||||
| getBlockId () | ||||
Get the ID of the block.
| ||||
| getHash () | ||||
Create a unique hash of the block restriction based on the type and value.
| ||||
| getValue () | ||||
Get the value of the restriction.
| ||||
| setBlockId ( $blockId) | ||||
Set the ID of the block.
| ||||
| toRow () | ||||
Convert a restriction object into a row array for insertion.
| ||||
Public Attributes | |
| const | TYPE = 'ns' |
| const | TYPE_ID = 2 |
Public Attributes inherited from MediaWiki\Block\Restriction\AbstractRestriction | |
| const | TYPE = '' |
| String constant identifying the type of restriction. | |
| const | TYPE_ID = 0 |
| Numeric type identifier. | |
Additional Inherited Members | ||||
Static Public Member Functions inherited from MediaWiki\Block\Restriction\AbstractRestriction | ||||
| static | getType () | |||
Get the type of restriction.
| ||||
| static | getTypeId () | |||
Get the ID of the type of restriction.This ID is used in the database.
| ||||
| static | newFromRow (\stdClass $row) | |||
Create a new Restriction from a database row.
| ||||
Protected Attributes inherited from MediaWiki\Block\Restriction\AbstractRestriction | ||||
| int | $blockId | |||
| int | $value | |||
Definition at line 13 of file NamespaceRestriction.php.
| MediaWiki\Block\Restriction\NamespaceRestriction::matches | ( | Title | $title | ) |
Determine if a restriction matches a given title.
| Title | $title |
Implements MediaWiki\Block\Restriction\Restriction.
Definition at line 28 of file NamespaceRestriction.php.
References MediaWiki\Title\Title\getNamespace(), and MediaWiki\Block\Restriction\AbstractRestriction\getValue().
| const MediaWiki\Block\Restriction\NamespaceRestriction::TYPE = 'ns' |
Definition at line 18 of file NamespaceRestriction.php.
| const MediaWiki\Block\Restriction\NamespaceRestriction::TYPE_ID = 2 |
Definition at line 23 of file NamespaceRestriction.php.