src/Common/Console/Command/Install.php
private function writeFile($vars, $file)
    {
        $fp = fopen($file, 'w');

        fwrite($fp, "<?php\n");
        foreach ($vars as $v) {

            if (is_string($v)) {

                fwrite($fp, $v . "\n");

            } else {

                if (is_numeric($v['value'])) {

                    $sValue = $v['value'];

                } else {

                    $sValue = "'" . str_replace("'", "\'", $v['value']) . "'";
                }

                fwrite($fp, "define('" . $v['key'] . "', " . $sValue . ");\n");
            }
        }

        fclose($fp);

        return true;
    }
private function writeFile($vars, $file)
    {
        $fp = fopen($file, 'w');

        fwrite($fp, "<?php\n");
        foreach ($vars as $v) {

            if (is_string($v)) {

                fwrite($fp, $v . "\n");

            } else {

                if (is_numeric($v['value'])) {

                    $sValue = $v['value'];

                } else {

                    $sValue = "'" . str_replace("'", "\'", $v['value']) . "'";
                }

                fwrite($fp, "define('" . $v['key'] . "', " . $sValue . ");\n");
            }
        }

        fclose($fp);

        return true;
    }
private function writeFile ( $ vars , $ file ) { $ fp = fopen ( $ file , 'w' ) ; fwrite ( $ fp , "<?php\n" ) ; foreach ( $ vars as $ v ) { if ( is_string ( $ v ) ) { fwrite ( $ fp , $ v . "\n" ) ; } else { if ( is_numeric ( $ v [ 'value' ] ) ) { $ sValue = $ v [ 'value' ] ; } else { $ sValue = "'" . str_replace ( "'" , "\'" , $ v [ 'value' ] ) . "'" ; } fwrite ( $ fp , "define('" . $ v [ 'key' ] . "', " . $ sValue . ");\n" ) ; } } fclose ( $ fp ) ; return true ; }
Writes the supplied variables to the config file

@param  array  $vars The variables to write
@param  string $file The file to write to

@return boolean
Writes the supplied variables to the config file