MediaWiki  master
Go to the documentation of this file.
1 <?php
3 namespace MediaWiki\Page;
6 use InvalidArgumentException;
16 interface PageLookup extends IDBAccessObject {
31  public function getPageForLink(
32  LinkTarget $link,
33  int $queryFlags = self::READ_NORMAL
45  public function getPageById(
46  int $pageId,
47  int $queryFlags = self::READ_NORMAL
60  public function getPageByName(
61  int $namespace,
62  string $dbKey,
63  int $queryFlags = self::READ_NORMAL
79  public function getPageByText(
80  string $text,
81  int $defaultNamespace = NS_MAIN,
82  int $queryFlags = self::READ_NORMAL
99  public function getExistingPageByText(
100  string $text,
101  int $defaultNamespace = NS_MAIN,
102  int $queryFlags = self::READ_NORMAL
103  ): ?ExistingPageRecord;
118  public function getPageByReference(
119  PageReference $page,
120  int $queryFlags = self::READ_NORMAL
121  ): ?ExistingPageRecord;
123 }
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:16
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.