function drush_command_implements

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

Determine which command files are implementing a hook.

Parameters

$hook: The name of the hook (e.g. "drush_help" or "drush_command").

Return value

An array with the names of the command files which are implementing this hook.

2 calls to drush_command_implements()
drush_command in includes/command.inc
Entry point for commands into the drush_invoke API
drush_command_invoke_all_ref in includes/command.inc

File

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

Code

function drush_command_implements($hook) {
  $implementations[$hook] = array();
  $list = drush_commandfile_list();
  foreach ($list as $commandfile => $file) {
    if (drush_command_hook($commandfile, $hook)) {
      $implementations[$hook][] = $commandfile;
    }
  }
  return (array) $implementations[$hook];
}