MediaWiki
REL1_40
NamespaceRestriction.php
Go to the documentation of this file.
1
<?php
23
namespace
MediaWiki\Block\Restriction
;
24
25
use
MediaWiki\Title\Title
;
26
27
class
NamespaceRestriction
extends
AbstractRestriction
{
28
32
public
const
TYPE
=
'ns'
;
33
37
public
const
TYPE_ID
= 2;
38
42
public
function
matches
(
Title
$title
) {
43
return
$this->
getValue
() === $title->
getNamespace
();
44
}
45
46
}
MediaWiki\Block\Restriction\AbstractRestriction
Definition
AbstractRestriction.php:25
MediaWiki\Block\Restriction\AbstractRestriction\getValue
getValue()
Gets the value of the restriction.1.33 int
Definition
AbstractRestriction.php:94
MediaWiki\Block\Restriction\NamespaceRestriction
Definition
NamespaceRestriction.php:27
MediaWiki\Block\Restriction\NamespaceRestriction\TYPE
const TYPE
Definition
NamespaceRestriction.php:32
MediaWiki\Block\Restriction\NamespaceRestriction\TYPE_ID
const TYPE_ID
Definition
NamespaceRestriction.php:37
MediaWiki\Block\Restriction\NamespaceRestriction\matches
matches(Title $title)
Determine if a restriction matches a given title.1.33 bool
Definition
NamespaceRestriction.php:42
MediaWiki\Title\Title
Represents a title within MediaWiki.
Definition
Title.php:82
MediaWiki\Title\Title\getNamespace
getNamespace()
Get the namespace index, i.e.
Definition
Title.php:1099
MediaWiki\Block\Restriction
Definition
AbstractRestriction.php:23
$title
$title
Definition
testCompression.php:39
includes
block
Restriction
NamespaceRestriction.php
Generated on Thu Jun 27 2024 14:02:25 for MediaWiki by
1.10.0