private function simpleXmlToArray(\SimpleXMLElement $xmlObject): array
    {
        $array = [];
        foreach ($xmlObject->children() as $node) {
            $array[$node->getName()] = is_array($node) ? $this->simpleXmlToArray($node) : (string) $node;
        }

        return $array;
    }
private function simpleXmlToArray(\SimpleXMLElement $xmlObject): array
    {
        $array = [];
        foreach ($xmlObject->children() as $node) {
            $array[$node->getName()] = is_array($node) ? $this->simpleXmlToArray($node) : (string) $node;
        }

        return $array;
    }
private function simpleXmlToArray ( \ SimpleXMLElement $ xmlObject ) : array { $ array = [ ] ; foreach ( $ xmlObject -> children ( ) as $ node ) { $ array [ $ node -> getName ( ) ] = is_array ( $ node ) ? $ this -> simpleXmlToArray ( $ node ) : ( string ) $ node ; } return $ array ; }
Convert a SimpleXML object to an associative array.

@param \SimpleXMLElement $xmlObject

@return array
Convert a SimpleXML object to an associative array .