function annotationcommand_adapter_commands

master annotationcommand_adapter.inc annotationcommand_adapter_commands()

Return the cached commands built by annotationcommand_adapter_discover.

See also

drush_get_commands()

1 call to annotationcommand_adapter_commands()
drush_get_commands in includes/command.inc
Get a list of all implemented commands. This invokes hook_drush_command().

File

includes/annotationcommand_adapter.inc, line 71
annotationcommand_adapter.inc

Code

function annotationcommand_adapter_commands() {
  $annotation_commandfiles = drush_get_context('DRUSH_ANNOTATED_COMMANDFILES');
  // Remove any entry in the commandfiles list from an ignored module.
  $ignored = implode('|', drush_get_option_list('ignored-modules'));
  $regex = "#/(modules|themes|profiles)(/|/.*/)($ignored)/#";
  foreach ($annotation_commandfiles as $key => $path) {
    if (preg_match($regex, $path)) {
      unset($annotation_commandfiles[$key]);
    }
  }
  $commands = annotationcommand_adapter_get_commands($annotation_commandfiles);
  $module_service_commands = drush_get_context('DRUSH_MODULE_SERVICE_COMMANDS');
  return array_merge($commands, $module_service_commands);
}