dev/BaseDevCommand.php
protected function saveConfig($key, $value)
    {
        $content = $this->readConfig();
     
        if (!$content) {
            $content = [];
        }
        
        $content[$key] = $value;
        
        $save = FileHelper::writeFile($this->configFile, Json::encode($content));
        
        if (!$save) {
            return $this->outputError("Unable to find config file " . $this->configFile. ". Please create and provide Permissions.");
        }
        
        return $value;
    }
protected function saveConfig($key, $value)
    {
        $content = $this->readConfig();
     
        if (!$content) {
            $content = [];
        }
        
        $content[$key] = $value;
        
        $save = FileHelper::writeFile($this->configFile, Json::encode($content));
        
        if (!$save) {
            return $this->outputError("Unable to find config file " . $this->configFile. ". Please create and provide Permissions.");
        }
        
        return $value;
    }
protected function saveConfig ( $ key , $ value ) { $ content = $ this -> readConfig ( ) ; if ( ! $ content ) { $ content = [ ] ; } $ content [ $ key ] = $ value ; $ save = FileHelper :: writeFile ( $ this -> configFile , Json :: encode ( $ content ) ) ; if ( ! $ save ) { return $ this -> outputError ( "Unable to find config file " . $ this -> configFile . ". Please create and provide Permissions." ) ; } return $ value ; }
Save a value in the config for a given key.

@param string $key
@param mixed $value
@return mixed
Save a value in the config for a given key .