public parseDomain ( SimpleXMLElement $xml, array &$ret ) : void | ||
$xml | SimpleXMLElement | The XML data of the component's configuration area |
$ret | array | |
리턴 | void |
public function parseDomain(SimpleXMLElement $xml, array &$ret)
{
// Initialise
$ret['dispatcher'] = array();
// Parse the dispatcher configuration
$dispatcherData = $xml->dispatcher;
// Sanity check
if (empty($dispatcherData)) {
return;
}
$options = $xml->xpath('dispatcher/option');
if (!empty($options)) {
foreach ($options as $option) {
$key = (string) $option['name'];
$ret['dispatcher'][$key] = (string) $option;
}
}
}