You are here

function xautoload_registry_files_alter in X Autoload 7.3

Same name and namespace in other branches
  1. 7.5 xautoload.system.inc \xautoload_registry_files_alter()
  2. 7 xautoload.module \xautoload_registry_files_alter()
  3. 7.2 xautoload.module \xautoload_registry_files_alter()
  4. 7.4 xautoload.system.inc \xautoload_registry_files_alter()

Implements hook_registry_files_alter()

Support wildcard syntax in the files[] setting in your module's info file. See https://drupal.org/node/1976198

Parameters

array &$files: List of files specified in files[] array in module info files. Format:

$files['modules/field/field.attach.inc'] = array( 'module' => 'field', 'weight' => 0, ); // Wildcard syntax. $files['sites/all/modules/foo/inc'] = array( 'module' => 'foo', 'weight' => 0, );

This function will remove the entry for foo/inc, and instead add all the individual class files found in the foo/inc/ folder.

array $modules: Array keys are numeric. Array values are objects each representing a module. This parameter will be ignored.

File

./xautoload.module, line 166

Code

function xautoload_registry_files_alter(&$files, $modules) {

  // The class file is loaded using the regular uncached xautoload autoload.
  $rec_scan = new xautoload_RegistryWildcard_RecursiveScan($files);
  foreach ($files as $path => $file) {
    $rec_scan
      ->check($path, $file);
  }
}