1.20.x bootstrap.inc public BackdropCacheArray::offsetGet($offset)

Implements ArrayAccess::offsetGet().

File

includes/bootstrap.inc, line 383
Functions that need to be loaded on every Backdrop request.

Class

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