function drush_command_include

8.0.x command.inc drush_command_include($command)
6.x command.inc drush_command_include($command)
7.x command.inc drush_command_include($command)
3.x command.inc drush_command_include($command)
4.x command.inc drush_command_include($command)
5.x command.inc drush_command_include($command)
master command.inc drush_command_include($command)

Conditionally include files based on the command used.

Steps through each of the currently loaded commandfiles and loads an optional commandfile based on the key.

When a command such as 'pm-enable' is called, this function will find all 'enable.pm.inc' files that are present in each of the commandfile directories.

1 call to drush_command_include()
_drush_invoke_hooks in includes/command.inc
Invoke Drush API calls, including all hooks.

File

includes/command.inc, line 1599
The drush command engine.

Code

function drush_command_include($command) {
  $include_files = drush_command_get_includes($command);
  foreach ($include_files as $filename => $commandfile) {
    drush_log(dt('Including !filename', array('!filename' => $filename)), LogLevel::BOOTSTRAP);
    include_once ($filename);
  }
}