class hackedFileIgnoreEndingsHasher in Hacked! 7.2
Same name and namespace in other branches
- 6.2 includes/hacked_project.inc \hackedFileIgnoreEndingsHasher
Created by PhpStorm. User: steven Date: 18/02/15 Time: 19:13
Hierarchy
- class \hackedFileHasher
Expanded class hierarchy of hackedFileIgnoreEndingsHasher
1 string reference to 'hackedFileIgnoreEndingsHasher'
- hacked_hacked_file_hashers_info in ./
hacked.module - Implements hook_hacked_file_hashers_info().
File
- includes/
hackedFileIgnoreEndingsHasher.inc, line 8
View source
class hackedFileIgnoreEndingsHasher extends hackedFileHasher {
/**
* Returns a hash of the given filename.
*
* Ignores file line endings.
*/
function perform_hash($filename) {
if (!hacked_file_is_binary($filename)) {
$file = file($filename, FILE_IGNORE_NEW_LINES);
return sha1(serialize($file));
}
else {
return sha1_file($filename);
}
}
function fetch_lines($filename) {
return file($filename, FILE_IGNORE_NEW_LINES);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
hackedFileHasher:: |
function | |||
hackedFileHasher:: |
function | |||
hackedFileHasher:: |
function | |||
hackedFileHasher:: |
function | Returns a hash of the given filename. | ||
hackedFileIgnoreEndingsHasher:: |
function |
Compute and return the lines of the given file. Overrides hackedFileHasher:: |
||
hackedFileIgnoreEndingsHasher:: |
function |
Returns a hash of the given filename. Overrides hackedFileHasher:: |