public function DrupalCacheArray::offsetGet

7.x bootstrap.inc public DrupalCacheArray::offsetGet($offset)

Implements ArrayAccess::offsetGet().

1 call to DrupalCacheArray::offsetGet()
DrupalCacheArray::offsetExists in drupal-7.x/includes/bootstrap.inc
Implements ArrayAccess::offsetExists().
1 method overrides DrupalCacheArray::offsetGet()
ThemeRegistry::offsetGet in drupal-7.x/includes/theme.inc
Implements ArrayAccess::offsetGet().

File

drupal-7.x/includes/bootstrap.inc, line 355
Functions that need to be loaded on every Drupal request.

Class

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

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);
  }
}