MediaWiki REL1_40
|
Service for normalizing a page name via a MediaWiki action API. More...
Public Member Functions | |
__construct ( $httpRequestFactory=null) | |
normalizePageName ( $pageName, $apiUrl, $followRedirect=self::FOLLOW_REDIRECT) | |
Returns the normalized form of the given page title, using the normalization rules of the given site. | |
Public Attributes | |
const | FOLLOW_REDIRECT = 1 |
const | NOFOLLOW_REDIRECT = 2 |
Service for normalizing a page name via a MediaWiki action API.
Definition at line 38 of file MediaWikiPageNameNormalizer.php.
MediaWiki\Site\MediaWikiPageNameNormalizer::__construct | ( | $httpRequestFactory = null | ) |
HttpRequestFactory | null | $httpRequestFactory |
Definition at line 51 of file MediaWikiPageNameNormalizer.php.
References MediaWiki\MediaWikiServices\getInstance().
MediaWiki\Site\MediaWikiPageNameNormalizer::normalizePageName | ( | $pageName, | |
$apiUrl, | |||
$followRedirect = self::FOLLOW_REDIRECT ) |
Returns the normalized form of the given page title, using the normalization rules of the given site.
If $followRedirect is set to self::FOLLOW_REDIRECT (default) and the given title is a redirect, the redirect will be resolved and the redirect target is returned. Only titles of existing pages will be returned.
string | $pageName | |
string | $apiUrl | |
int | $followRedirect | either self::FOLLOW_REDIRECT or self::NOFOLLOW_REDIRECT |
\MWException
InvalidArgumentException |
Definition at line 83 of file MediaWikiPageNameNormalizer.php.
References wfAppendQuery(), and wfDebugLog().
const MediaWiki\Site\MediaWikiPageNameNormalizer::FOLLOW_REDIRECT = 1 |
Definition at line 40 of file MediaWikiPageNameNormalizer.php.
const MediaWiki\Site\MediaWikiPageNameNormalizer::NOFOLLOW_REDIRECT = 2 |
Definition at line 41 of file MediaWikiPageNameNormalizer.php.