|
MediaWiki master
|
Service for normalizing a page name via a MediaWiki action API. More...
Public Member Functions | |
| __construct ( $httpRequestFactory=null) | |
| normalizePageName (string $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 24 of file MediaWikiPageNameNormalizer.php.
| MediaWiki\Site\MediaWikiPageNameNormalizer::__construct | ( | $httpRequestFactory = null | ) |
| HttpRequestFactory | null | $httpRequestFactory |
Definition at line 37 of file MediaWikiPageNameNormalizer.php.
References MediaWiki\MediaWikiServices\getInstance().
| MediaWiki\Site\MediaWikiPageNameNormalizer::normalizePageName | ( | string | $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 |
Definition at line 67 of file MediaWikiPageNameNormalizer.php.
References $url, wfAppendQuery(), and wfDebugLog().
| const MediaWiki\Site\MediaWikiPageNameNormalizer::FOLLOW_REDIRECT = 1 |
Definition at line 26 of file MediaWikiPageNameNormalizer.php.
| const MediaWiki\Site\MediaWikiPageNameNormalizer::NOFOLLOW_REDIRECT = 2 |
Definition at line 27 of file MediaWikiPageNameNormalizer.php.