MediaWiki  master
LegacyArticleIdAccess.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Page;
4 
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:76
Interface for objects (potentially) representing an editable wiki page.
getId( $wikiId=self::LOCAL)
Returns the page ID.
trait LegacyArticleIdAccess
Convenience trait for conversion to PageIdentity.