public function ThemeRegistry::offsetGet

Overrides CacheArray::offsetGet().

Overrides CacheArray::offsetGet

File

drupal/core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 98
Definition of Drupal\Core\Utility\ThemeRegistry

Class

ThemeRegistry
Builds the run-time theme registry.

Namespace

Drupal\Core\Utility

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