"Convert" an DOMElement object into a PHP variable.
public static xmlToVariable ( DOMElement $element ) : mixed | ||
$element | DOMElement | |
return | mixed |
/** * Generate node configuration from XML representation. * * @param DOMElement $element * @return array * @ignore */ public static function configurationFromXML(DOMElement $element) { $configuration = array(); foreach ($element->getElementsByTagName('variable') as $variable) { $configuration[$variable->getAttribute('name')] = ezcWorkflowDefinitionStorageXml::xmlToVariable(ezcWorkflowUtil::getChildNode($variable)); } return $configuration; }
/** * Generate node configuration from XML representation. * * @param DOMElement $element * @return array * @ignore */ public static function configurationFromXML(DOMElement $element) { $configuration = array('class' => $element->getAttribute('serviceObjectClass'), 'arguments' => array()); $childNode = ezcWorkflowUtil::getChildNode($element); if ($childNode->tagName == 'arguments') { foreach (ezcWorkflowUtil::getChildNodes($childNode) as $argument) { $configuration['arguments'][] = ezcWorkflowDefinitionStorageXml::xmlToVariable($argument); } } return $configuration; }