public function offsetGet($name)
{
if (!$this->offsetExists($name)) {
throw ContainerValueNotSetException::for_name($name, 'read');
}
if ($this->is_bootstrapped && !array_key_exists($name, $this->shared)) {
throw ContainerBootstrappedException::for_name($name, 'read');
}
if (!array_key_exists($name, $this->values)) {
$factory = $this->factories[$name];
$this->values[$name] = $factory($this);
if ($this->is_locked) {
unset($this->factories[$name]);
}
}
return $this->values[$name];
}