MediaWiki  master
Go to the documentation of this file.
1 <?php
3 namespace MediaWiki\Page;
6 use InvalidArgumentException;
17 interface PageLookup extends IDBAccessObject {
32  public function getPageForLink(
33  LinkTarget $link,
34  int $queryFlags = self::READ_NORMAL
46  public function getPageById(
47  int $pageId,
48  int $queryFlags = self::READ_NORMAL
61  public function getPageByName(
62  int $namespace,
63  string $dbKey,
64  int $queryFlags = self::READ_NORMAL
80  public function getPageByText(
81  string $text,
82  int $defaultNamespace = NS_MAIN,
83  int $queryFlags = self::READ_NORMAL
100  public function getExistingPageByText(
101  string $text,
102  int $defaultNamespace = NS_MAIN,
103  int $queryFlags = self::READ_NORMAL
104  ): ?ExistingPageRecord;
119  public function getPageByReference(
120  PageReference $page,
121  int $queryFlags = self::READ_NORMAL
122  ): ?ExistingPageRecord;
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
getExistingPageByText(string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=self::READ_NORMAL)
Returns an ExistingPageRecord for a given user provided page name text.
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.
getPageByText(string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=self::READ_NORMAL)
Returns a PageIdentity for a given user provided page name text.
getPageForLink(LinkTarget $link, int $queryFlags=self::READ_NORMAL)
Returns the PageIdentity for the given LinkTarget.
getPageByReference(PageReference $page, int $queryFlags=self::READ_NORMAL)
Returns the PageRecord of the given page.
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.