Example #1
0
 /**
  * Get Configuration
  * @return $config
  **/
 function readConfig($template, $xmlfile, $custom = false)
 {
     $config = array();
     $xmldoc =& JFactory::getXMLParser('Simple');
     $xmldoc->loadfile($xmlfile);
     $xmlconfig = $xmldoc->document->config[0];
     if ($xmlconfig) {
         foreach ($xmlconfig->children() as $child) {
             $config[] = JYAML::readXML($template, $child, $custom);
         }
     } else {
         unset($xmldoc);
     }
     return $config;
 }