public function saveSecurityConfiguration($pathOverride = null, $debug = false) {
        if (!$this->ready) {
            //If the security file has not be loaded or started yet, return false
            return false;
        }
        //Set the path to attempt to write to
        $path = $pathOverride ?: $this->securityFile;

        //convert stuff and write out the file
        $dumper = new Dumper();
        $output = $dumper->dump($this->config, $this->determineMaxDepthOfConfig());

        try {
            file_put_contents($path, $output);
        } catch (\Exception $e) {
            if ($debug) {
                throw $e;
            } else {
                return false;
            }
        }

        return true;
    }
public function saveSecurityConfiguration($pathOverride = null, $debug = false) {
        if (!$this->ready) {
            //If the security file has not be loaded or started yet, return false
            return false;
        }
        //Set the path to attempt to write to
        $path = $pathOverride ?: $this->securityFile;

        //convert stuff and write out the file
        $dumper = new Dumper();
        $output = $dumper->dump($this->config, $this->determineMaxDepthOfConfig());

        try {
            file_put_contents($path, $output);
        } catch (\Exception $e) {
            if ($debug) {
                throw $e;
            } else {
                return false;
            }
        }

        return true;
    }
public function saveSecurityConfiguration ( $ pathOverride = null , $ debug = false ) { if ( ! $ this -> ready ) { //If the security file has not be loaded or started yet, return false return false ; } //Set the path to attempt to write to $ path = $ pathOverride ? : $ this -> securityFile ; //convert stuff and write out the file $ dumper = new Dumper ( ) ; $ output = $ dumper -> dump ( $ this -> config , $ this -> determineMaxDepthOfConfig ( ) ) ; try { file_put_contents ( $ path , $ output ) ; } catch ( \ Exception $ e ) { if ( $ debug ) { throw $ e ; } else { return false ; } } return true ; }
Saves the security configuration settings to a file

@param  string  $pathOverride Optional file path to attempt to read from instead of the default injected one
@param  boolean $debug        Whether to throw an error or to just return false on file operations

@return boolean               Whether the write was successful or not
Saves the security configuration settings to a file