public function DrupalCacheArray::offsetGet in Drupal 7
Implements ArrayAccess::offsetGet().
1 call to DrupalCacheArray::offsetGet()
- DrupalCacheArray::offsetExists in includes/
bootstrap.inc - Implements ArrayAccess::offsetExists().
1 method overrides DrupalCacheArray::offsetGet()
- ThemeRegistry::offsetGet in includes/
theme.inc - Implements ArrayAccess::offsetGet().
File
- includes/
bootstrap.inc, line 369 - 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);
}
}