public function setValue($name, $value, $section = 0, $key = null)
    {
        if (!preg_match('/^[^\\[\\]]*$/', $name)) {
            throw new IniInvalidArgumentException("Invalid value name $name");
        }

        if (is_array($value)) {
            if ($key !== null) {
                throw new IniInvalidArgumentException('You cannot indicate a key for an array value');
            }
            $this->_setArrayValue($name, $value, $section);
        } else {
            $this->_setValue($name, $value, $section, $key);
        }
    }
public function setValue($name, $value, $section = 0, $key = null)
    {
        if (!preg_match('/^[^\\[\\]]*$/', $name)) {
            throw new IniInvalidArgumentException("Invalid value name $name");
        }

        if (is_array($value)) {
            if ($key !== null) {
                throw new IniInvalidArgumentException('You cannot indicate a key for an array value');
            }
            $this->_setArrayValue($name, $value, $section);
        } else {
            $this->_setValue($name, $value, $section, $key);
        }
    }
public function setValue ( $ name , $ value , $ section = 0 , $ key = null ) { if ( ! preg_match ( '/^[^\\[\\]]*$/' , $ name ) ) { throw new IniInvalidArgumentException ( "Invalid value name $name" ) ; } if ( is_array ( $ value ) ) { if ( $ key !== null ) { throw new IniInvalidArgumentException ( 'You cannot indicate a key for an array value' ) ; } $ this -> _setArrayValue ( $ name , $ value , $ section ) ; } else { $ this -> _setValue ( $ name , $ value , $ section , $ key ) ; } }
modify an option in the ini file. If the option doesn't exist,
it is created.

@param string $name    the name of the option to modify
@param string $value   the new value
@param string $section the section where to set the item. 0 is the global section
@param int    $key     for option which is an item of array, the key in the array. '' to just add a value in the array
modify an option in the ini file . If the option doesn t exist it is created .