MediaWiki
REL1_33
NamespaceRestriction.php
Go to the documentation of this file.
1
<?php
23
namespace
MediaWiki\Block\Restriction
;
24
25
class
NamespaceRestriction
extends
AbstractRestriction
{
26
30
const
TYPE
=
'ns'
;
31
35
const
TYPE_ID
= 2;
36
40
public
function
matches
( \
Title
$title ) {
41
return
$this->
getValue
() === $title->
getNamespace
();
42
}
43
44
}
MediaWiki\Block\Restriction\AbstractRestriction
Definition
AbstractRestriction.php:25
MediaWiki\Block\Restriction\AbstractRestriction\getValue
getValue()
@inheritDoc
Definition
AbstractRestriction.php:92
MediaWiki\Block\Restriction\NamespaceRestriction
Definition
NamespaceRestriction.php:25
MediaWiki\Block\Restriction\NamespaceRestriction\matches
matches(\Title $title)
@inheritDoc
Definition
NamespaceRestriction.php:40
MediaWiki\Block\Restriction\NamespaceRestriction\TYPE
const TYPE
@inheritDoc
Definition
NamespaceRestriction.php:30
MediaWiki\Block\Restriction\NamespaceRestriction\TYPE_ID
const TYPE_ID
@inheritDoc
Definition
NamespaceRestriction.php:35
Title
Represents a title within MediaWiki.
Definition
Title.php:40
Title\getNamespace
getNamespace()
Get the namespace index, i.e.
Definition
Title.php:994
MediaWiki\Block\Restriction
Definition
AbstractRestriction.php:23
includes
block
Restriction
NamespaceRestriction.php
Generated on Mon Nov 25 2024 15:49:11 for MediaWiki by
1.10.0