예제 #1
0
파일: Xml.php 프로젝트: Clansuite/Clansuite
 /**
  * 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);
 }
예제 #2
0
파일: XML.php 프로젝트: 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);
 }