protected function CachedContainerBuilder::getCache in Service Container 7.2
Same name and namespace in other branches
- 7 src/DependencyInjection/CachedContainerBuilder.php \Drupal\service_container\DependencyInjection\CachedContainerBuilder::getCache()
Retrieves the cache id of the container definition.
Return value
string The hardcoded cache id or via variable_get() if defined.
2 calls to CachedContainerBuilder::getCache()
- CachedContainerBuilder::getContainerDefinition in src/
DependencyInjection/ CachedContainerBuilder.php - Returns the fully build container definition.
- CachedContainerBuilder::isCached in src/
DependencyInjection/ CachedContainerBuilder.php - Determines if the container is cached.
File
- src/
DependencyInjection/ CachedContainerBuilder.php, line 99 - Contains \Drupal\service_container\DependencyInjection\CachedContainerBuilder
Class
- CachedContainerBuilder
- CachedContainerBuilder retrieves the container definition from cache or builds it.
Namespace
Drupal\service_container\DependencyInjectionCode
protected function getCache() {
if (isset($this->cachedDefinition)) {
return $this->cachedDefinition;
}
$cache = $this->cache
->get($this
->getCacheId());
$this->cachedDefinition = FALSE;
if (!empty($cache->data)) {
$this->cachedDefinition = $cache->data;
}
return $this->cachedDefinition;
}