|
MediaWiki master
|
Service for storing and retrieving page redirect information. More...
Inherits MediaWiki\Page\RedirectLookup.

Public Member Functions | |
| __construct (IConnectionProvider $dbProvider, 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 25 of file RedirectStore.php.
| MediaWiki\Page\RedirectStore::__construct | ( | IConnectionProvider | $dbProvider, |
| PageLookup | $pageLookup, | ||
| TitleParser | $titleParser, | ||
| RepoGroup | $repoGroup, | ||
| LoggerInterface | $logger ) |
Definition at line 33 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 200 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 49 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 116 of file RedirectStore.php.
References MediaWiki\Page\PageIdentity\getId(), MediaWiki\Page\PageReference\getNamespace(), and NS_FILE.