xmlToVariable() public static method

"Convert" an DOMElement object into a PHP variable.
public static xmlToVariable ( DOMElement $element ) : mixed
$element DOMElement
return mixed
Exemplo n.º 1
0
Arquivo: set.php Projeto: bmdevel/ezc
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * 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;
 }