MediaWiki  master
NamespaceRestriction.php
Go to the documentation of this file.
1 <?php
24 
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 }
getValue()
Gets the value of the restriction.1.33 int
getNamespace()
Get the namespace index, i.e.
Definition: Title.php:1040
matches(\Title $title)
Determine if a restriction matches a given title.1.33 bool