You are here

public function ThemeRegistry::offsetGet in Drupal 7

Implements ArrayAccess::offsetGet().

Overrides DrupalCacheArray::offsetGet

File

includes/theme.inc, line 424
The theme system, which controls the output of Drupal.

Class

ThemeRegistry
Builds the run-time theme registry.

Code

public function offsetGet($offset) {

  // If the offset is set but empty, it is a registered theme hook that has
  // not yet been requested. Offsets that do not exist at all were not
  // registered in hook_theme().
  if (isset($this->storage[$offset])) {
    return $this->storage[$offset];
  }
  elseif (array_key_exists($offset, $this->storage)) {
    return $this
      ->resolveCacheMiss($offset);
  }
}