MediaWiki REL1_31
|
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. | |
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. | |
static | singleton () |
Get the singleton instance of this class. | |
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.
|
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(), and singleton().
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.
|
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().