You are here

public function StateWrapper::get in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/State/StateWrapper.php \Drupal\webprofiler\State\StateWrapper::get()
  2. 8.2 webprofiler/src/State/StateWrapper.php \Drupal\webprofiler\State\StateWrapper::get()
  3. 4.x webprofiler/src/State/StateWrapper.php \Drupal\webprofiler\State\StateWrapper::get()

Gets value from the cache.

Parameters

string $key: Key that identifies the data.

Return value

mixed The corresponding cache data.

Overrides CacheCollector::get

File

webprofiler/src/State/StateWrapper.php, line 44

Class

StateWrapper
Class StateWrapper.

Namespace

Drupal\webprofiler\State

Code

public function get($key, $default = NULL) {
  $this->dataCollector
    ->addState($key);
  return $this->state
    ->get($key, $default);
}