MediaWiki REL1_39
MediaWiki\Page Namespace Reference

Namespaces

namespace  Hook
 

Classes

interface  ContentModelChangeFactory
 Service for changing the content model of wiki pages. More...
 
class  DeletePage
 Backend logic for performing a page delete action. More...
 
interface  DeletePageFactory
 Service for page delete actions. More...
 
interface  ExistingPageRecord
 Data record representing a page that currently exists as an editable page on a wiki. More...
 
interface  MergeHistoryFactory
 Service for mergehistory actions. More...
 
interface  MovePageFactory
 Service for page rename actions. More...
 
class  PageAssertionException
 Exception if a PageIdentity is an invalid argument. More...
 
class  PageCommandFactory
 Implementation of various page action services. More...
 
interface  PageIdentity
 Interface for objects (potentially) representing an editable wiki page. More...
 
class  PageIdentityValue
 Immutable value object representing a page identity. More...
 
interface  PageLookup
 Service for looking up information about wiki pages. More...
 
interface  PageRecord
 Data record representing a page that is (or used to be, or could be) an editable page on a wiki. More...
 
interface  PageReference
 Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki. More...
 
class  PageReferenceValue
 Immutable value object representing a page reference. More...
 
class  PageSelectQueryBuilder
 
class  PageStore
 
class  PageStoreFactory
 
class  PageStoreRecord
 Immutable data record representing an editable page on a wiki. More...
 
class  ParserOutputAccess
 Service for getting rendered output of a given page. More...
 
interface  ProperPageIdentity
 Interface for a page that is (or could be, or used to be) an editable wiki page. More...
 
interface  RedirectLookup
 Service for resolving a wiki page redirect. More...
 
class  RedirectStore
 Service for storing and retreiving page redirect information. More...
 
class  RollbackPage
 Backend logic for performing a page rollback action. More...
 
interface  RollbackPageFactory
 Service for page rollback actions. More...
 
class  UndeletePage
 Backend logic for performing a page undelete action. More...
 
interface  UndeletePageFactory
 Service for page undelete actions. More...
 
class  WikiPageFactory
 Service for creating WikiPage objects. More...
 

Variables

trait LegacyArticleIdAccess
 Convenience trait for conversion to PageIdentity.
 

Variable Documentation

◆ LegacyArticleIdAccess

trait MediaWiki::Page\LegacyArticleIdAccess
Initial value:
{
protected function getArticleId( PageIdentity $title ): int {
if ( $title instanceof Title ) {
return $title->getArticleID();
}
return $title->getId( $this->getWikiId() );
}
abstract protected function getWikiId()
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
Definition WebStart.php:82
Represents a title within MediaWiki.
Definition Title.php:49

Convenience trait for conversion to PageIdentity.

For the cross-wiki aware code, this should be used instead of PageIdentity::getId until Title is dropped. Before transition to PageIdentity, Title could exist for foreign wikis with no indication about it (Title does not have $wikiId). It was very brittle, but it worked. Until Title is deprecated in the codebase, most of the PageIdentity instances passed around are Titles. So for cross-wiki access, stricter domain validation of PageIdentity::getId will break wikis.

Additionally, loose checks on Title regarding whether the page can exist or not have been depended upon in a number of places in the codebase.

This trait is only supposed to be used in cross-wiki aware code, and only exists until code up the stack is guaranteed not to pass Title.

Access: internal

Definition at line 25 of file LegacyArticleIdAccess.php.