Caching service that looks up normalized file names from Wikimedia Commons.
More...
Caching service that looks up normalized file names from Wikimedia Commons.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch
◆ __construct()
Wikibase\Repo\CachingCommonsMediaFileNameLookup::__construct |
( |
MediaWikiPageNameNormalizer | $mediaWikiPageNameNormalizer, |
|
|
BagOStuff | $cache ) |
◆ cacheResult()
Wikibase\Repo\CachingCommonsMediaFileNameLookup::cacheResult |
( |
| $inputFileName, |
|
|
| $actualFileName ) |
|
private |
- Parameters
-
string | $inputFileName | |
string | null | $actualFileName | |
◆ doLookup()
Wikibase\Repo\CachingCommonsMediaFileNameLookup::doLookup |
( |
| $fileName | ) |
|
|
private |
- Parameters
-
- Returns
- string|null
◆ getCacheKey()
Wikibase\Repo\CachingCommonsMediaFileNameLookup::getCacheKey |
( |
| $fileName | ) |
|
|
private |
◆ lookupFileName()
Wikibase\Repo\CachingCommonsMediaFileNameLookup::lookupFileName |
( |
| $fileName | ) |
|
- Parameters
-
string | $fileName | File name, without the File: prefix. |
- Returns
- string|null The normalized file name or null if the page does not exist
- Exceptions
-
◆ $cache
Wikibase\Repo\CachingCommonsMediaFileNameLookup::$cache |
|
private |
◆ $mediaWikiPageNameNormalizer
Wikibase\Repo\CachingCommonsMediaFileNameLookup::$mediaWikiPageNameNormalizer |
|
private |
◆ CACHE_DURATION
const Wikibase\Repo\CachingCommonsMediaFileNameLookup::CACHE_DURATION = 600 |
|
private |
The documentation for this class was generated from the following file: