MediaWiki  master
PageLookup.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Page;
4 
6 use InvalidArgumentException;
8 
14 interface PageLookup extends IDBAccessObject {
15 
29  public function getPageForLink(
30  LinkTarget $link,
31  int $queryFlags = self::READ_NORMAL
33 
43  public function getPageById(
44  int $pageId,
45  int $queryFlags = self::READ_NORMAL
47 
58  public function getPageByName(
59  int $namespace,
60  string $dbKey,
61  int $queryFlags = self::READ_NORMAL
63 
77  public function getPageByText(
78  string $text,
79  int $defaultNamespace = NS_MAIN,
80  int $queryFlags = self::READ_NORMAL
82 
97  public function getExistingPageByText(
98  string $text,
99  int $defaultNamespace = NS_MAIN,
100  int $queryFlags = self::READ_NORMAL
101  ): ?ExistingPageRecord;
102 
115  public function getPageByReference(
116  PageReference $page,
117  int $queryFlags = self::READ_NORMAL
118  ): ?ExistingPageRecord;
119 
120 }
Page\PageLookup\getPageById
getPageById(int $pageId, int $queryFlags=self::READ_NORMAL)
Returns the PageRecord of the given page.
Page\PageLookup\getExistingPageByText
getExistingPageByText(string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=self::READ_NORMAL)
Returns an ExistingPageRecord for a given user provided page name text.
Page\PageLookup\getPageByReference
getPageByReference(PageReference $page, int $queryFlags=self::READ_NORMAL)
Returns the PageRecord of the given page.
IDBAccessObject
Interface for database access objects.
Definition: IDBAccessObject.php:57
Page\PageReference
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
Definition: PageReference.php:49
NS_MAIN
const NS_MAIN
Definition: Defines.php:64
Page\PageLookup\getPageForLink
getPageForLink(LinkTarget $link, int $queryFlags=self::READ_NORMAL)
Returns the PageIdentity for the given LinkTarget.
Page\ExistingPageRecord
Data record representing a page that currently exists as an editable page on a wiki.
Definition: ExistingPageRecord.php:15
Page\ProperPageIdentity
Interface for objects representing a page that is (or could be, or used to be) an editable page on a ...
Definition: ProperPageIdentity.php:43
Page\PageLookup
Service interface for looking up infermation about wiki pages.
Definition: PageLookup.php:14
Page\PageLookup\getPageByName
getPageByName(int $namespace, string $dbKey, int $queryFlags=self::READ_NORMAL)
Returns the PageRecord for the given name and namespace.
MediaWiki\Page
Definition: ContentModelChangeFactory.php:23
MediaWiki\Linker\LinkTarget
Definition: LinkTarget.php:26
Page\PageLookup\getPageByText
getPageByText(string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=self::READ_NORMAL)
Returns a PageIdentity for a given user provided page name text.