/** * Sets value method * * @param string $name * @param mixed $value */ public function __set($name, $value) { if ($this->_allowModifications) { if (is_array($value)) { $value = new $this->_defaultConfigClass($value, true); } if ($name === null) { $this->_data[] = $value; $this->_count = count($this->_data); } else { $this->_dirtyFields[] = $name; parent::__set($name, $value); } } else { throw new Enlight_Config_Exception('Enlight_Config is read only'); } }