public function KeyValueMemoryFactory::get in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/KeyValueStore/KeyValueMemoryFactory.php \Drupal\Core\KeyValueStore\KeyValueMemoryFactory::get()
- 9 core/lib/Drupal/Core/KeyValueStore/KeyValueMemoryFactory.php \Drupal\Core\KeyValueStore\KeyValueMemoryFactory::get()
File
- core/
lib/ Drupal/ Core/ KeyValueStore/ KeyValueMemoryFactory.php, line 20
Class
- KeyValueMemoryFactory
- Defines the key/value store factory for the memory backend.
Namespace
Drupal\Core\KeyValueStoreCode
public function get($collection) {
if (!isset($this->collections[$collection])) {
$this->collections[$collection] = new MemoryStorage($collection);
}
return $this->collections[$collection];
}