public function DrupalCacheArray::offsetGet

public DrupalCacheArray::offsetGet($offset)

Implements ArrayAccess::offsetGet().

File

includes/bootstrap.inc, line 364
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);
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/DrupalCacheArray::offsetGet/7.x