MediaWiki  master
PageLookup.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Page;
4 
6 use InvalidArgumentException;
8 
17 interface PageLookup extends IDBAccessObject {
18 
32  public function getPageForLink(
33  LinkTarget $link,
34  int $queryFlags = self::READ_NORMAL
36 
46  public function getPageById(
47  int $pageId,
48  int $queryFlags = self::READ_NORMAL
50 
61  public function getPageByName(
62  int $namespace,
63  string $dbKey,
64  int $queryFlags = self::READ_NORMAL
66 
80  public function getPageByText(
81  string $text,
82  int $defaultNamespace = NS_MAIN,
83  int $queryFlags = self::READ_NORMAL
85 
100  public function getExistingPageByText(
101  string $text,
102  int $defaultNamespace = NS_MAIN,
103  int $queryFlags = self::READ_NORMAL
104  ): ?ExistingPageRecord;
105 
119  public function getPageByReference(
120  PageReference $page,
121  int $queryFlags = self::READ_NORMAL
122  ): ?ExistingPageRecord;
123 
124 }
const NS_MAIN
Definition: Defines.php:64
Interface for database access objects.
Data record representing a page that currently exists as an editable page on a wiki.
Service for looking up information about wiki pages.
Definition: PageLookup.php:17
getPageForLink(LinkTarget $link, int $queryFlags=self::READ_NORMAL)
Returns the PageIdentity for the given LinkTarget.
getPageByName(int $namespace, string $dbKey, int $queryFlags=self::READ_NORMAL)
Returns the PageRecord for the given name and namespace.
getPageById(int $pageId, int $queryFlags=self::READ_NORMAL)
Returns the PageRecord of the given page.
getExistingPageByText(string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=self::READ_NORMAL)
Returns an ExistingPageRecord for a given user provided page name text.
getPageByReference(PageReference $page, int $queryFlags=self::READ_NORMAL)
Returns the PageRecord of the given page.
getPageByText(string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=self::READ_NORMAL)
Returns a PageIdentity for a given user provided page name text.
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
Interface for a page that is (or could be, or used to be) an editable wiki page.