Parses a collection of "option" XML nodes.
\SimpleXMLElement $nodes The XML nodes:
array The options
protected function parseOptions(\SimpleXMLElement $nodes) {
$options = array();
foreach ($nodes as $node) {
if (count($node) > 0) {
if (count($node->value) > 0) {
$value = $this
->parseValues($node->value);
}
elseif (count($node->constraint) > 0) {
$value = $this
->parseConstraints($node->constraint);
}
else {
$value = array();
}
}
else {
$value = trim($node);
}
$options[(string) $node['name']] = $value;
}
return $options;
}