public function write()
{
$configKeys = array_keys(self::$_configArray);
$lastKey = end($configKeys);
/* process config */
$content = '<?php' . PHP_EOL . 'return' . PHP_EOL . '[' . PHP_EOL;
foreach (self::$_configArray as $key => $value) {
if ($value) {
$content .= ' \'' . $key . '\' => \'' . $value . '\'';
} else {
$content .= ' \'' . $key . '\' => null';
}
if ($key !== $lastKey) {
$content .= ',';
}
$content .= PHP_EOL;
}
$content .= '];';
/* write to file */
return file_put_contents(self::$_configFile, $content) > 0;
}