MediaWiki REL1_39
|
Service for looking up information about wiki pages. More...
Public Member Functions | |
getExistingPageByText (string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=self::READ_NORMAL) | |
Returns an ExistingPageRecord for a given user provided page name text. | |
getPageById (int $pageId, int $queryFlags=self::READ_NORMAL) | |
Returns the PageRecord of the given page. | |
getPageByName (int $namespace, string $dbKey, int $queryFlags=self::READ_NORMAL) | |
Returns the PageRecord for the given name and namespace. | |
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. | |
getPageForLink (LinkTarget $link, int $queryFlags=self::READ_NORMAL) | |
Returns the PageIdentity for the given LinkTarget. | |
Additional Inherited Members | |
Public Attributes inherited from IDBAccessObject | |
const | READ_NONE = -1 |
Constants for object loading bitfield flags (higher => higher QoS) | |
Service for looking up information about wiki pages.
Default implementation is PageStore.
Definition at line 16 of file PageLookup.php.
MediaWiki\Page\PageLookup::getExistingPageByText | ( | string | $text, |
int | $defaultNamespace = NS_MAIN, | ||
int | $queryFlags = self::READ_NORMAL ) |
Returns an ExistingPageRecord for a given user provided page name text.
Returns null if the page does not exist or if title is not a valid name of a proper page, e.g if it is a special page, an interwiki link, a relative section line, or simply invalid.
string | $text | |
int | $defaultNamespace | Namespace to assume per default (usually NS_MAIN) |
int | $queryFlags |
Implemented in MediaWiki\Page\PageStore.
MediaWiki\Page\PageLookup::getPageById | ( | int | $pageId, |
int | $queryFlags = self::READ_NORMAL ) |
Returns the PageRecord of the given page.
int | $pageId | |
int | $queryFlags |
InvalidArgumentException | if $pageId is 0 or negative. |
Implemented in MediaWiki\Page\PageStore.
MediaWiki\Page\PageLookup::getPageByName | ( | int | $namespace, |
string | $dbKey, | ||
int | $queryFlags = self::READ_NORMAL ) |
Returns the PageRecord for the given name and namespace.
int | $namespace | |
string | $dbKey | |
int | $queryFlags |
InvalidArgumentException | if $namespace is negative or $dbKey is empty. |
Implemented in MediaWiki\Page\PageStore.
MediaWiki\Page\PageLookup::getPageByReference | ( | PageReference | $page, |
int | $queryFlags = self::READ_NORMAL ) |
Returns the PageRecord of the given page.
May return $page if that already is a PageRecord. If $page is a PageIdentity, implementations may call methods like exists() and getId() on it.
The PageReference must refer to a proper page - that is, it must not refer to a special page.
PageReference | $page | |
int | $queryFlags |
InvalidArgumentException | if $page does not refer to a proper page. |
Implemented in MediaWiki\Page\PageStore.
MediaWiki\Page\PageLookup::getPageByText | ( | string | $text, |
int | $defaultNamespace = NS_MAIN, | ||
int | $queryFlags = self::READ_NORMAL ) |
Returns a PageIdentity for a given user provided page name text.
Returns null if the title is not a valid name of a proper page, e.g if it is a special page, an interwiki link, a relative section line, or simply invalid.
string | $text | |
int | $defaultNamespace | Namespace to assume per default (usually NS_MAIN) |
int | $queryFlags |
Implemented in MediaWiki\Page\PageStore.
MediaWiki\Page\PageLookup::getPageForLink | ( | LinkTarget | $link, |
int | $queryFlags = self::READ_NORMAL ) |
Returns the PageIdentity for the given LinkTarget.
The page does not have to exist. Fragments are ignored.
The LinkTarget must refer to a proper page - that is, it must not be a relative section link, an interwiki link, or refer to a special page.
LinkTarget | $link | |
int | $queryFlags |
InvalidArgumentException | if $link does not refer to a proper page. |
Implemented in MediaWiki\Page\PageStore.