function DrupalCacheArray::offsetGet

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 370

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.