MediaWiki  master
PageIdentity.php
Go to the documentation of this file.
1 <?php
21 namespace MediaWiki\Page;
22 
24 use RuntimeException;
25 use Wikimedia\Assert\PreconditionException;
26 
65 interface PageIdentity extends WikiAwareEntity {
66 
78  public function getWikiId();
79 
110  public function getId( $wikiId = self::LOCAL ): int;
111 
131  public function canExist(): bool;
132 
145  public function exists(): bool;
146 
158  public function getNamespace(): int;
159 
168  public function getDBkey(): string;
169 
182  public function isSamePageAs( PageIdentity $other );
183 
190  public function __toString(): string;
191 
192 }
Page\PageIdentity
Interface for objects (potentially) representing an editable wiki page.
Definition: PageIdentity.php:65
Page\PageIdentity\getDBkey
getDBkey()
Get the page title in DB key form.
Page\PageIdentity\getId
getId( $wikiId=self::LOCAL)
Returns the page ID.
MediaWiki\DAO\WikiAwareEntity
Marker interface for entities aware of the wiki they belong to.
Definition: WikiAwareEntity.php:34
Page\PageIdentity\__toString
__toString()
Returns an informative human readable representation of the page identity, for use in logging and deb...
Page\PageIdentity\exists
exists()
Checks if the page currently exists.
Page\PageIdentity\getWikiId
getWikiId()
Get the ID of the wiki this page belongs to.
MediaWiki\Page
Definition: ContentModelChangeFactory.php:23
Page\PageIdentity\canExist
canExist()
Checks whether this PageIdentity represents a "proper" page, meaning that it could exist as an editab...
Page\PageIdentity\isSamePageAs
isSamePageAs(PageIdentity $other)
Checks whether the given PageIdentity refers to the same page as this PageIdentity.
Page\PageIdentity\getNamespace
getNamespace()
Returns the page's namespace number.