MediaWiki REL1_39
FileContentsHasher Class Reference
Collaboration diagram for FileContentsHasher:

Public Member Functions

 __construct ()
 

Static Public Member Functions

static getFileContentsHash ( $filePaths)
 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
 

Detailed Description

Definition at line 22 of file FileContentsHasher.php.

Constructor & Destructor Documentation

◆ __construct()

FileContentsHasher::__construct ( )

Definition at line 31 of file FileContentsHasher.php.

Member Function Documentation

◆ getFileContentsHash()

static FileContentsHasher::getFileContentsHash ( $filePaths)
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[]$filePathsOne or more file paths.
Returns
string|bool Hash of files' contents, or false if no file could not be read.

Definition at line 87 of file FileContentsHasher.php.

References $hashes.

◆ singleton()

static FileContentsHasher::singleton ( )
static

Get the singleton instance of this class.

Returns
FileContentsHasher

Definition at line 40 of file FileContentsHasher.php.

Member Data Documentation

◆ $cache

BagOStuff FileContentsHasher::$cache
protected

Definition at line 26 of file FileContentsHasher.php.


The documentation for this class was generated from the following file: