You are here

public static function XmlHelper::convertToSimpleArray in Helper 7

File

lib/XmlHelper.php, line 109

Class

XmlHelper

Code

public static function convertToSimpleArray($data) {
  $xml = static::normalizeDataToSimpleXml($data);
  $array = json_decode(json_encode((array) $xml), 1);
  return array(
    $xml
      ->getName() => $array,
  );
}