delimiterToCamelCaseArray() public static method

public static delimiterToCamelCaseArray ( $array, $delimiter = '[\-\_]' )
Example #1
0
 /**
  * Converts an XML string into a multidimensional array
  *
  * @param string $xml
  * @return array
  */
 public static function arrayFromXml($xml)
 {
     $document = new DOMDocument('1.0', 'UTF-8');
     $document->loadXML($xml);
     $root = $document->documentElement->nodeName;
     return Util::delimiterToCamelCaseArray([$root => self::_nodeToValue($document->childNodes->item(0))]);
 }