class hackedFileIgnoreEndingsHasher in Hacked! 8.2
Class hackedFileIgnoreEndingsHasher @package Drupal\hacked
Hierarchy
- class \Drupal\hacked\hackedFileHasher- class \Drupal\hacked\hackedFileIgnoreEndingsHasher
 
Expanded class hierarchy of hackedFileIgnoreEndingsHasher
File
- src/hackedFileIgnoreEndingsHasher.php, line 9 
Namespace
Drupal\hackedView 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:: | 
