/** * Write the configarray to the xml file * * @param string The filename * @param array Array to transform and write as xml * @return mixed array | boolean false */ public static function writeConfig($file, $array) { // transform associative PHP array to XML $xml = \Koch\Datatype\Conversion::arrayToXML($array); // write xml into the file file_put_contents($file, $xml); }
/** * Write the configarray to the xml file. * * @param string The filename * @param array Array to transform and write as xml * * @return bool array | boolean false */ public static function write($file, array $array) { $xml = Conversion::arrayToXML($array); return (bool) file_put_contents($file, $xml); }