MediaWiki  master
LegacyArticleIdAccess.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Page;
4 
5 use Title;
6 
40  protected function getArticleId( PageIdentity $title ): int {
41  if ( $title instanceof Title ) {
42  return $title->getArticleID();
43  }
44  return $title->getId( $this->getWikiId() );
45  }
46 
52  abstract protected function getWikiId();
53 }
Represents a title within MediaWiki.
Definition: Title.php:52
Interface for objects (potentially) representing an editable wiki page.
trait LegacyArticleIdAccess
Convenience trait for conversion to PageIdentity.