MediaWiki
REL1_34
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()
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:1037
MediaWiki\Block\Restriction
Definition
AbstractRestriction.php:23
$title
$title
Definition
testCompression.php:34
includes
block
Restriction
NamespaceRestriction.php
Generated on Fri Apr 5 2024 23:09:42 for MediaWiki by
1.9.8