function annotationcommand_adapter_cache_module_console_commands

master annotationcommand_adapter.inc annotationcommand_adapter_cache_module_console_commands($console_command, $commandfile_path = null)

TODO: document

1 call to annotationcommand_adapter_cache_module_console_commands()
DrupalBoot8::bootstrap_drupal_full in lib/Drush/Boot/DrupalBoot8.php
Attempt to load the full Drupal system.

File

includes/annotationcommand_adapter.inc, line 279
annotationcommand_adapter.inc

Code

function annotationcommand_adapter_cache_module_console_commands($console_command, $commandfile_path = null) {
  if (!isset($commandfile_path)) {
    $class = new \ReflectionClass($console_command);
    $commandfile_path = $class->getFileName();
  }
  $module_service_commands = drush_get_context('DRUSH_MODULE_SERVICE_COMMANDS');
  $commands = annotationcommand_adapter_get_command_for_console_command($console_command, $commandfile_path);
  drush_set_context('DRUSH_MODULE_SERVICE_COMMANDS', array_merge($commands, $module_service_commands));
}