MediaWiki
1.30.2
|
Public Member Functions | |
__construct () | |
getFileContentsHashInternal ( $filePath, $algo='md4') | |
Get a hash of a file's contents, either by retrieving a previously- computed hash from the cache, or by computing a hash from the file. More... | |
Static Public Member Functions | |
static | getFileContentsHash ( $filePaths, $algo='md4') |
Get a hash of the combined contents of one or more files, either by retrieving a previously-computed hash from the cache, or by computing a hash from the files. More... | |
static | singleton () |
Get the singleton instance of this class. More... | |
Protected Attributes | |
BagOStuff | $cache |
Static Private Attributes | |
static FileContentsHasher | $instance |
Definition at line 22 of file FileContentsHasher.php.
FileContentsHasher::__construct | ( | ) |
Definition at line 30 of file FileContentsHasher.php.
References cache, and ObjectCache\getLocalServerInstance().
|
static |
Get a hash of the combined contents of one or more files, either by retrieving a previously-computed hash from the cache, or by computing a hash from the files.
string | string[] | $filePaths | One or more file paths. |
string | $algo | Name of selected hashing algorithm. |
Definition at line 89 of file FileContentsHasher.php.
References $hashes, $instance, array(), captcha-old\count, getFileContentsHashInternal(), singleton(), and use.
Referenced by ResourceLoaderFileModule\compileLessFile(), ResourceLoaderModule\safeFileHash(), FileContentsHasherTest\testMultipleFileHash(), and FileContentsHasherTest\testSingleFileHash().
FileContentsHasher::getFileContentsHashInternal | ( | $filePath, | |
$algo = 'md4' |
|||
) |
Get a hash of a file's contents, either by retrieving a previously- computed hash from the cache, or by computing a hash from the file.
string | $filePath | Full path to the file. |
string | $algo | Name of selected hashing algorithm. |
Definition at line 56 of file FileContentsHasher.php.
References cache.
Referenced by getFileContentsHash().
|
static |
Get the singleton instance of this class.
Definition at line 39 of file FileContentsHasher.php.
References $instance.
Referenced by getFileContentsHash().
|
protected |
Definition at line 25 of file FileContentsHasher.php.
|
staticprivate |
Definition at line 28 of file FileContentsHasher.php.
Referenced by getFileContentsHash(), and singleton().