public function set($key, $value)
    {
        $keys = explode('.', $key);
        $config = &$this->_arr;

        foreach ($keys as $val) {
            $config = &$config[$val];
        }

        $config = $value;
    }
public function set($key, $value)
    {
        $keys = explode('.', $key);
        $config = &$this->_arr;

        foreach ($keys as $val) {
            $config = &$config[$val];
        }

        $config = $value;
    }
public function set ( $ key , $ value ) { $ keys = explode ( '.' , $ key ) ; $ config = & $ this -> _arr ; foreach ( $ keys as $ val ) { $ config = & $ config [ $ val ] ; } $ config = $ value ; }
Sets config value based on key.

To set a sub-array configuration, you can use a dot separated key.
For example, given this configuration array :

array(
'basePath' => 'somepath',
'params' => array(
'somekey' => 'value of key'
)
);

To set the value of 'somekey' to 'another value of key', you can call the method like this :

$config->set('params.somekey','another value of key');

@param string $key Dot-separated string of key
@param mixed $value
Sets config value based on key .