MediaWiki
1.34.0
|
Public Member Functions | |
__construct (callable $blacklistCallback, BagOStuff $cache, RepoGroup $repoGroup, TitleParser $titleParser) | |
Do not call directly. More... | |
isBadFile ( $name, LinkTarget $contextTitle=null) | |
Determine if a file exists on the 'bad image list'. More... | |
Private Attributes | |
array null | $badFiles |
Parsed blacklist. More... | |
callable | $blacklistCallback |
Returns contents of blacklist (see comment for isBadFile()) More... | |
BagOStuff | $cache |
Cache of parsed bad image list. More... | |
RepoGroup | $repoGroup |
TitleParser | $titleParser |
Definition at line 12 of file BadFileLookup.php.
MediaWiki\BadFileLookup::__construct | ( | callable | $blacklistCallback, |
BagOStuff | $cache, | ||
RepoGroup | $repoGroup, | ||
TitleParser | $titleParser | ||
) |
Do not call directly.
Use MediaWikiServices.
callable | $blacklistCallback | Callback that returns wikitext of a file blacklist |
BagOStuff | $cache | For caching parsed versions of the blacklist |
RepoGroup | $repoGroup | |
TitleParser | $titleParser |
Definition at line 36 of file BadFileLookup.php.
References $cache.
MediaWiki\BadFileLookup::isBadFile | ( | $name, | |
LinkTarget | $contextTitle = null |
||
) |
Determine if a file exists on the 'bad image list'.
The format of MediaWiki:Bad_image_list is as follows:
string | $name | The file name to check |
LinkTarget | null | $contextTitle | The page on which the file occurs, if known |
Definition at line 61 of file BadFileLookup.php.
References $file, $line, $lines, $title, and Hooks\run().
|
private |
Parsed blacklist.
Definition at line 26 of file BadFileLookup.php.
|
private |
Returns contents of blacklist (see comment for isBadFile())
Definition at line 14 of file BadFileLookup.php.
|
private |
Cache of parsed bad image list.
Definition at line 17 of file BadFileLookup.php.
|
private |
Definition at line 20 of file BadFileLookup.php.
|
private |
Definition at line 23 of file BadFileLookup.php.