public function StorageBase::get

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

Overrides KeyValueStoreInterface::get

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

File

drupal/core/lib/Drupal/Core/KeyValueStore/StorageBase.php, line 39
Contains Drupal\Core\KeyValueStore\StorageBase.

Class

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

Namespace

Drupal\Core\KeyValueStore

Code

public function get($key) {
  $values = $this
    ->getMultiple(array(
    $key,
  ));
  return isset($values[$key]) ? $values[$key] : NULL;
}