MediaWiki  1.34.0
MediaWiki\Block\Restriction\NamespaceRestriction Class Reference
Inheritance diagram for MediaWiki\Block\Restriction\NamespaceRestriction:
Collaboration diagram for MediaWiki\Block\Restriction\NamespaceRestriction:

Public Member Functions

 matches (\Title $title)
 Determine if a restriction matches a given title.
Since
1.33
Parameters
\\Title$title
Returns
bool
More...
 
- Public Member Functions inherited from MediaWiki\Block\Restriction\AbstractRestriction
 __construct ( $blockId, $value)
 Create Restriction. More...
 
 equals (Restriction $other)
 Determine if a restriction equals another restriction.
Since
1.33
Parameters
Restriction$other
Returns
bool
More...
 
 getBlockId ()
 Gets the id of the block.
Since
1.33
Returns
int
More...
 
 getHash ()
 Create a unique hash of the block restriction based on the type and value.
Since
1.33
Returns
string
More...
 
 getValue ()
 Gets the value of the restriction.
Since
1.33
Returns
int
More...
 
 setBlockId ( $blockId)
 Sets the id of the block.
Since
1.33
Parameters
int$blockId
Returns
self
More...
 
 toRow ()
 Convert a restriction object into a row array for insertion.
Since
1.33
Returns
array
More...
 

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. More...
 
const TYPE_ID = 0
 Numeric type identifier. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Block\Restriction\AbstractRestriction
static getType ()
 Gets the type of restriction.
Since
1.33
Returns
string
More...
 
static getTypeId ()
 Gets the id of the type of restriction.This id is used in the database.
Since
1.33
Returns
int
More...
 
static newFromRow (\stdClass $row)
 Creates a new Restriction from a database row.
Since
1.33
Parameters
\\stdClass$row
Returns
static
More...
 
- Protected Attributes inherited from MediaWiki\Block\Restriction\AbstractRestriction
int $blockId
 
int $value
 

Detailed Description

Definition at line 25 of file NamespaceRestriction.php.

Member Function Documentation

◆ matches()

MediaWiki\Block\Restriction\NamespaceRestriction::matches ( \Title  $title)

Determine if a restriction matches a given title.

Since
1.33
Parameters
\\Title$title
Returns
bool

Implements MediaWiki\Block\Restriction\Restriction.

Definition at line 40 of file NamespaceRestriction.php.

References Title\getNamespace(), and MediaWiki\Block\Restriction\AbstractRestriction\getValue().

Member Data Documentation

◆ TYPE

const MediaWiki\Block\Restriction\NamespaceRestriction::TYPE = 'ns'

◆ TYPE_ID

const MediaWiki\Block\Restriction\NamespaceRestriction::TYPE_ID = 2

Definition at line 35 of file NamespaceRestriction.php.


The documentation for this class was generated from the following file: