MediaWiki master
NamespaceRestriction.php
Go to the documentation of this file.
1<?php
10
12
14
18 public const TYPE = 'ns';
19
23 public const TYPE_ID = 2;
24
28 public function matches( Title $title ) {
29 return $this->getValue() === $title->getNamespace();
30 }
31
32}
getValue()
Get the value of the restriction.1.33 int
matches(Title $title)
Determine if a restriction matches a given title.1.33 bool
Represents a title within MediaWiki.
Definition Title.php:69
getNamespace()
Get the namespace index, i.e.
Definition Title.php:1037