MediaWiki
REL1_35
NamespaceRestriction.php
Go to the documentation of this file.
1
<?php
23
namespace
MediaWiki\Block\Restriction
;
24
25
class
NamespaceRestriction
extends
AbstractRestriction
{
26
30
public
const
TYPE
=
'ns'
;
31
35
public
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()
Gets the value of the restriction.1.33 int
Definition
AbstractRestriction.php:94
MediaWiki\Block\Restriction\NamespaceRestriction
Definition
NamespaceRestriction.php:25
MediaWiki\Block\Restriction\NamespaceRestriction\matches
matches(\Title $title)
Determine if a restriction matches a given title.1.33 bool
Definition
NamespaceRestriction.php:40
MediaWiki\Block\Restriction\NamespaceRestriction\TYPE
const TYPE
Definition
NamespaceRestriction.php:30
MediaWiki\Block\Restriction\NamespaceRestriction\TYPE_ID
const TYPE_ID
Definition
NamespaceRestriction.php:35
Title
Represents a title within MediaWiki.
Definition
Title.php:42
Title\getNamespace
getNamespace()
Get the namespace index, i.e.
Definition
Title.php:1041
MediaWiki\Block\Restriction
Definition
AbstractRestriction.php:23
$title
$title
Definition
testCompression.php:38
includes
block
Restriction
NamespaceRestriction.php
Generated on Sat Apr 6 2024 00:06:57 for MediaWiki by
1.9.8