/** * Returns the value with the given name. * * @since 3.0.0 * * @param string $name The name of a value. * * @return mixed The value with the given name. * * @throws ContextValueNotSetException if there is no value with the given name. */ public function offsetGet($name) { if ($this->offsetExists($name)) { return $this->cache[$name]; } throw ContextValueNotSetException::for_name($name, 'read'); }