You are here

class hackedFileIgnoreEndingsHasher in Hacked! 6.2

Same name and namespace in other branches
  1. 7.2 includes/hackedFileIgnoreEndingsHasher.inc \hackedFileIgnoreEndingsHasher

Hierarchy

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/hacked_project.inc, line 734

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);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
hackedFileHasher::cache_get function
hackedFileHasher::cache_key function
hackedFileHasher::cache_set function
hackedFileHasher::hash function Returns a hash of the given filename.
hackedFileIgnoreEndingsHasher::perform_hash function Returns a hash of the given filename. Overrides hackedFileHasher::perform_hash