Parse all changed files and save their interface and class listings.
Parse all files that have changed since the registry was last built, and save their interface and class listings.
$files: The list of files to check and parse.
function _registry_parse_files($files) {
$parsed_files = array();
foreach ($files as $filename => $file) {
if (file_exists($filename)) {
$hash = hash_file('sha256', $filename);
if (empty($file['hash']) || $file['hash'] != $hash) {
$file['hash'] = $hash;
$parsed_files[$filename] = $file;
}
}
}
foreach ($parsed_files as $filename => $file) {
_registry_parse_file($filename, file_get_contents($filename), $file['module'], $file['weight']);
db_merge('registry_file')
->key(array(
'filename' => $filename,
))
->fields(array(
'hash' => $file['hash'],
))
->execute();
}
return array_keys($parsed_files);
}