function drush_command_invoke_all_ref

8.0.x command.inc drush_command_invoke_all_ref($hook, &$reference_parameter)
6.x command.inc drush_command_invoke_all_ref($hook, &$reference_parameter)
7.x command.inc drush_command_invoke_all_ref($hook, &$reference_parameter)
3.x command.inc drush_command_invoke_all_ref($hook, &$reference_parameter)
4.x command.inc drush_command_invoke_all_ref($hook, &$reference_parameter)
5.x command.inc drush_command_invoke_all_ref($hook, &$reference_parameter)
master command.inc drush_command_invoke_all_ref($hook, &$reference_parameter)

A drush_command_invoke_all() that wants the first parameter to be passed by reference.

See also

drush_command_invoke_all()

8 calls to drush_command_invoke_all_ref()
drush_cache_clear_types in commands/core/cache.drush.inc
All types of caches available for clearing. Contrib commands can alter in their own.
drush_dispatch in includes/command.inc
Given a command record, dispatch it as if it were the original command. Executes in the currently bootstrapped site using the current option contexts. Note that drush_dispatch will not bootstrap any further than the current command has already…
drush_get_global_options in includes/drush.inc
Get the available global options. Used by help command. Command files may modify this list using hook_drush_help_alter().
drush_global_options_command in commands/core/help.drush.inc
Build a fake command for the purposes of showing examples and options.
drush_pm_download in commands/pm/download.pm.inc
Command callback. Download Drupal core or any project.

... See full list

1 string reference to 'drush_command_invoke_all_ref'
drush_command_invoke_all in includes/command.inc
Invoke a hook in all available command files that implement it.

File

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

Code

function drush_command_invoke_all_ref($hook, &$reference_parameter) {
  $args = func_get_args();
  array_shift($args);
  // Insure that call_user_func_array can alter first parameter
  $args[0] = &$reference_parameter;
  $return = array();
  $modules = drush_command_implements($hook);
  if ($hook != 'drush_invoke_alter') {
    // Allow modules to control the order of hook invocations
    drush_command_invoke_all_ref('drush_invoke_alter', $modules, $hook);
  }
  foreach ($modules as $module) {
    $function = $module . '_' . $hook;
    $result = call_user_func_array($function, $args);
    if (isset($result) && is_array($result)) {
      $return = array_merge_recursive($return, $result);
    }
    else if (isset($result)) {
      $return[] = $result;
    }
  }
  return $return;
}