|
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.
|
|
|
| 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.
|
|
Definition at line 22 of file FileContentsHasher.php.
◆ __construct()
FileContentsHasher::__construct |
( |
| ) |
|
◆ getFileContentsHash()
static FileContentsHasher::getFileContentsHash |
( |
|
$filePaths, |
|
|
|
$algo = 'md4' |
|
) |
| |
|
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.
- Parameters
-
string | string[] | $filePaths | One or more file paths. |
string | $algo | Name of selected hashing algorithm. |
- Returns
- string|bool Hash of files' contents, or false if no file could not be read.
Definition at line 88 of file FileContentsHasher.php.
References $hashes, $instance, getFileContentsHashInternal(), and singleton().
Referenced by TemplateParser\compile(), ResourceLoaderFileModule\compileLessString(), ResourceLoaderFileModule\getFileHashes(), TemplateParser\getTemplate(), and ResourceLoaderModule\safeFileHash().
◆ getFileContentsHashInternal()
FileContentsHasher::getFileContentsHashInternal |
( |
|
$filePath, |
|
|
|
$algo = 'md4' |
|
) |
| |
|
private |
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.
- Parameters
-
string | $filePath | Full path to the file. |
string | $algo | Name of selected hashing algorithm. |
- Returns
- string|bool Hash of file contents, or false if the file could not be read.
Definition at line 55 of file FileContentsHasher.php.
Referenced by getFileContentsHash().
◆ singleton()
static FileContentsHasher::singleton |
( |
| ) |
|
|
static |
◆ $cache
◆ $instance
The documentation for this class was generated from the following file: