MediaWiki master
|
Service for storing and retrieving page redirect information. More...
Inherits MediaWiki\Page\RedirectLookup.
Public Member Functions | |
__construct (IConnectionProvider $connectionProvider, PageLookup $pageLookup, TitleParser $titleParser, RepoGroup $repoGroup, LoggerInterface $logger) | |
clearCache ( $page) | |
Clear process-cached redirect information for a page. | |
getRedirectTarget (PageIdentity $page) | |
Get the redirect destination. | |
updateRedirectTarget (PageIdentity $page, ?LinkTarget $target, ?bool $lastRevWasRedirect=null) | |
Update the redirect target for a page. | |
Service for storing and retrieving page redirect information.
Definition at line 39 of file RedirectStore.php.
MediaWiki\Page\RedirectStore::__construct | ( | IConnectionProvider | $connectionProvider, |
PageLookup | $pageLookup, | ||
TitleParser | $titleParser, | ||
RepoGroup | $repoGroup, | ||
LoggerInterface | $logger ) |
Definition at line 47 of file RedirectStore.php.
MediaWiki\Page\RedirectStore::clearCache | ( | $page | ) |
Clear process-cached redirect information for a page.
LinkTarget | PageIdentity | $page | The page to clear the cache for. |
Definition at line 213 of file RedirectStore.php.
MediaWiki\Page\RedirectStore::getRedirectTarget | ( | PageIdentity | $page | ) |
Get the redirect destination.
PageIdentity | $page |
PageAssertionException | If page does not represent an editable page |
Implements MediaWiki\Page\RedirectLookup.
Definition at line 62 of file RedirectStore.php.
MediaWiki\Page\RedirectStore::updateRedirectTarget | ( | PageIdentity | $page, |
?LinkTarget | $target, | ||
?bool | $lastRevWasRedirect = null ) |
Update the redirect target for a page.
PageIdentity | $page | The page to update the redirect target for. |
LinkTarget | null | $target | The new redirect target, or null if this is not a redirect. |
bool | null | $lastRevWasRedirect | Whether the last revision was a redirect, or null if not known. If set, this allows eliding writes to the redirect table. |
true
on success, false
on failure. Definition at line 129 of file RedirectStore.php.
References MediaWiki\Page\PageIdentity\getId(), MediaWiki\Page\PageReference\getNamespace(), and NS_FILE.