You are here

public function StorageBase::setMultiple in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/KeyValueStore/StorageBase.php \Drupal\Core\KeyValueStore\StorageBase::setMultiple()

Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::setMultiple().

Overrides KeyValueStoreInterface::setMultiple

1 method overrides StorageBase::setMultiple()
MemoryStorage::setMultiple in lib/Drupal/Core/KeyValueStore/MemoryStorage.php
Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::setMultiple().

File

lib/Drupal/Core/KeyValueStore/StorageBase.php, line 47
Contains \Drupal\Core\KeyValueStore\StorageBase.

Class

StorageBase
Provides a base class for key/value storage implementations.

Namespace

Drupal\Core\KeyValueStore

Code

public function setMultiple(array $data) {
  foreach ($data as $key => $value) {
    $this
      ->set($key, $value);
  }
}