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;
    }