public static function xml_decode($data, $toArray = false) { /* TODO: What to do with 'toArray'? Just write it as you need. */ $data = simplexml_load_string($data); return $data; }