function _drush_array_overlay_recursive

8.0.x engines.inc _drush_array_overlay_recursive($a, $b)
7.x engines.inc _drush_array_overlay_recursive($a, $b)
master engines.inc _drush_array_overlay_recursive($a, $b)
2 calls to _drush_array_overlay_recursive()
drush_merge_engine_data in includes/engines.inc
Add command structure info from each engine type back into the command.
make_apply_defaults in commands/make/make.utilities.inc
Apply any defaults.

File

includes/engines.inc, line 349
The drush engines API implementation and helpers.

Code

function _drush_array_overlay_recursive($a, $b) {
  foreach ($b as $key => $value) {
    if (!isset($a[$key]) || !is_array($a[$key])) {
      $a[$key] = $b[$key];
    }
    else {
      $a[$key] = _drush_array_overlay_recursive($a[$key], $b[$key]);
    }
  }
  return $a;
}