Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
Archivo: XML.php Proyecto: ksst/kf
 /**
  * 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);
 }