public function setConfig($key, $value = null)
    {
        $configurator = $this->getConfigurator();
        if(!is_scalar($key)){
            $configuratorClass = get_class($configurator);
            $configurator->merge(new $configuratorClass($key, true));
        }else{
            $configurator[$key] = $value;
        }

        return $this;
    }
public function setConfig($key, $value = null)
    {
        $configurator = $this->getConfigurator();
        if(!is_scalar($key)){
            $configuratorClass = get_class($configurator);
            $configurator->merge(new $configuratorClass($key, true));
        }else{
            $configurator[$key] = $value;
        }

        return $this;
    }
public function setConfig ( $ key , $ value = null ) { $ configurator = $ this -> getConfigurator ( ) ; if ( ! is_scalar ( $ key ) ) { $ configuratorClass = get_class ( $ configurator ) ; $ configurator -> merge ( new $ configuratorClass ( $ key , true ) ) ; } else { $ configurator [ $ key ] = $ value ; } return $ this ; }
Set a config item. Add recursive if key is traversable.

@param string|array|\Traversable $key
@param mixed $value

@return $this
Set a config item . Add recursive if key is traversable .