public function saveContents($contents)
    {

        $path = pathinfo($this->configFileLocation);

        //BACKUP CURRENT config.php
        $backup = $this->backupPath.'/pluginconfig.'.date('Y_m_d_His').'.php';
        FileSystemUtils::safeCopy($this->configFileLocation, $backup);

        //OVERWRITE config.php WITH POSTED CONTENTS
        FileSystemUtils::safeFilePutContents($this->configFileLocation, $contents);

        $this->VersionService->incrementDeploymentRevision('Saved config.php');

    }
public function saveContents($contents)
    {

        $path = pathinfo($this->configFileLocation);

        //BACKUP CURRENT config.php
        $backup = $this->backupPath.'/pluginconfig.'.date('Y_m_d_His').'.php';
        FileSystemUtils::safeCopy($this->configFileLocation, $backup);

        //OVERWRITE config.php WITH POSTED CONTENTS
        FileSystemUtils::safeFilePutContents($this->configFileLocation, $contents);

        $this->VersionService->incrementDeploymentRevision('Saved config.php');

    }
public function saveContents ( $ contents ) { $ path = pathinfo ( $ this -> configFileLocation ) ; //BACKUP CURRENT config.php $ backup = $ this -> backupPath . '/pluginconfig.' . date ( 'Y_m_d_His' ) . '.php' ; FileSystemUtils :: safeCopy ( $ this -> configFileLocation , $ backup ) ; //OVERWRITE config.php WITH POSTED CONTENTS FileSystemUtils :: safeFilePutContents ( $ this -> configFileLocation , $ contents ) ; $ this -> VersionService -> incrementDeploymentRevision ( 'Saved config.php' ) ; }
Writes the contents to the config file, after first
backing up the current config

@param string $contents The contents to write to the config file

@return void
Writes the contents to the config file after first backing up the current config