public function CacheArray::offsetGet

Implements ArrayAccess::offsetGet().

1 call to CacheArray::offsetGet()
CacheArray::offsetExists in drupal/core/lib/Drupal/Core/Utility/CacheArray.php
Implements ArrayAccess::offsetExists().
1 method overrides CacheArray::offsetGet()
ThemeRegistry::offsetGet in drupal/core/lib/Drupal/Core/Utility/ThemeRegistry.php
Overrides CacheArray::offsetGet().

File

drupal/core/lib/Drupal/Core/Utility/CacheArray.php, line 134
Definition of CacheArray

Class

CacheArray
Provides a caching wrapper to be used in place of large array structures.

Namespace

Drupal\Core\Utility

Code

public function offsetGet($offset) {
  if (isset($this->storage[$offset]) || array_key_exists($offset, $this->storage)) {
    return $this->storage[$offset];
  }
  else {
    return $this
      ->resolveCacheMiss($offset);
  }
}