MediaWiki REL1_39
LegacyArticleIdAccess.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Page;
4
5use Title;
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:49
Interface for objects (potentially) representing an editable wiki page.