|
MediaWiki
master
|

Public Member Functions | |
| __construct () | |
| Constructor. More... | |
| 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 | ( | ) |
Constructor.
Definition at line 33 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 92 of file FileContentsHasher.php.
References $hashes, $instance, array(), getFileContentsHashInternal(), 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 59 of file FileContentsHasher.php.
References cache.
Referenced by getFileContentsHash().
|
static |
Get the singleton instance of this class.
Definition at line 42 of file FileContentsHasher.php.
|
protected |
Definition at line 25 of file FileContentsHasher.php.
|
staticprivate |
Definition at line 28 of file FileContentsHasher.php.
Referenced by getFileContentsHash().