public function offsetGet($offset) { $this ->initialize(); if (!array_key_exists($offset, $this->values)) { throw new \OutOfRangeException(sprintf('The variable "%s" does not exist.', $offset)); } return $this->values[$offset]; }