MediaWiki master
NamespaceRestriction.php
Go to the documentation of this file.
1<?php
24
26
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}
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:78
getNamespace()
Get the namespace index, i.e.
Definition Title.php:1043