You are here

public function ArrayObject::merge in Express 8

Merges multiple values into the array.

Parameters

array $values: An associative key/value array.

bool $recursive: Flag determining whether or not to recursively merge key/value pairs.

1 call to ArrayObject::merge()
Attributes::setAttributes in themes/contrib/bootstrap/src/Utility/Attributes.php
Sets multiple attributes on the array.

File

themes/contrib/bootstrap/src/Utility/ArrayObject.php, line 264
Contains \Drupal\bootstrap\Utility\ArrayObject.

Class

ArrayObject
Custom ArrayObject implementation.

Namespace

Drupal\bootstrap\Utility

Code

public function merge(array $values, $recursive = TRUE) {
  if ($recursive) {
    $this->array = NestedArray::mergeDeepArray([
      $this->array,
      $values,
    ], TRUE);
  }
  else {
    $this->array += $values;
  }
}