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