|
MediaWiki master
|
Service for looking up information about wiki pages. More...
Inherited by MediaWiki\Page\PageStore.
Public Member Functions | |
| getExistingPageByText (string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=IDBAccessObject::READ_NORMAL) | |
| Returns an ExistingPageRecord for a given user provided page name text. | |
| getPageById (int $pageId, int $queryFlags=IDBAccessObject::READ_NORMAL) | |
| Returns the PageRecord of the given page. | |
| getPageByName (int $namespace, string $dbKey, int $queryFlags=IDBAccessObject::READ_NORMAL) | |
| Returns the PageRecord for the given name and namespace. | |
| getPageByReference (PageReference $page, int $queryFlags=IDBAccessObject::READ_NORMAL) | |
| Returns the PageRecord of the given page. | |
| getPageByText (string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=IDBAccessObject::READ_NORMAL) | |
| Returns a PageIdentity for a given user provided page name text. | |
| getPageForLink (LinkTarget $link, int $queryFlags=IDBAccessObject::READ_NORMAL) | |
| Returns the PageIdentity for the given LinkTarget. | |
Service for looking up information about wiki pages.
Default implementation is PageStore.
Definition at line 17 of file PageLookup.php.
| MediaWiki\Page\PageLookup::getExistingPageByText | ( | string | $text, |
| int | $defaultNamespace = NS_MAIN, | ||
| int | $queryFlags = IDBAccessObject::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 by default (usually NS_MAIN) |
| int | $queryFlags |
Implemented in MediaWiki\Page\PageStore.
| MediaWiki\Page\PageLookup::getPageById | ( | int | $pageId, |
| int | $queryFlags = IDBAccessObject::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 = IDBAccessObject::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 = IDBAccessObject::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 = IDBAccessObject::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 by default (usually NS_MAIN) |
| int | $queryFlags |
Implemented in MediaWiki\Page\PageStore.
| MediaWiki\Page\PageLookup::getPageForLink | ( | LinkTarget | $link, |
| int | $queryFlags = IDBAccessObject::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. |