CacheCollector::has

public CacheCollector::has($key)

Returns whether data exists for this key.

Parameters

string $key: Key that identifies the data.

Overrides CacheCollectorInterface::has

File

core/lib/Drupal/Core/Cache/CacheCollector.php, line 133

Class

CacheCollector
Default implementation for CacheCollectorInterface.

Namespace

Drupal\Core\Cache

Code

public function has($key) {
  // Make sure the value is loaded.
  $this->get($key);
  return isset($this->storage[$key]) || array_key_exists($key, $this->storage);
}
doc_Drupal
2016-10-29 08:49:22
Comments
Leave a Comment

Please login to continue.