_values = $contents[$section]; } else { $this->_values = $contents; } } /** * Get the contents of the ini file as a plain array. * * @return array */ public function asArray() { return $this->_values; } /** * Part of ArrayAccess implementation. * * @param string $name */ public function offsetExists($name) { return isset($this->_values[$name]); } /** * Part of ArrayAccess implementation. * * @param string $name */ public function offsetGet($name) { if (!isset($this->_values[$name])) { return null; } return $this->_values[$name]; } /** * Part of ArrayAccess implementation. * * @param string $name */ public function offsetSet($name, $value) { throw new LogicException('You cannot modify an IniFile parse result.'); } /** * Part of ArrayAccess implementation. * * @param string $name */ public function offsetUnset($name) { unset($this->_values[$name]); } }