MediaWiki REL1_39
NamespaceRestriction.php
Go to the documentation of this file.
1<?php
24
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}
getValue()
Gets 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:49
getNamespace()
Get the namespace index, i.e.
Definition Title.php:1066