protected function replaceVars(DOMElement $node, array $vars)
	{
		foreach ($this->xpath->query('.//var', $node) as $varNode)
		{
			$varName = $varNode->getAttribute('name');

			if (isset($vars[$varName]))
			{
				$varNode->parentNode->replaceChild(
					$this->dom->createTextNode($vars[$varName]),
					$varNode
				);
			}
		}
	}
protected function replaceVars(DOMElement $node, array $vars)
	{
		foreach ($this->xpath->query('.//var', $node) as $varNode)
		{
			$varName = $varNode->getAttribute('name');

			if (isset($vars[$varName]))
			{
				$varNode->parentNode->replaceChild(
					$this->dom->createTextNode($vars[$varName]),
					$varNode
				);
			}
		}
	}
protected function replaceVars ( DOMElement $ node , array $ vars ) { foreach ( $ this -> xpath -> query ( './/var' , $ node ) as $ varNode ) { $ varName = $ varNode -> getAttribute ( 'name' ) ; if ( isset ( $ vars [ $ varName ] ) ) { $ varNode -> parentNode -> replaceChild ( $ this -> dom -> createTextNode ( $ vars [ $ varName ] ) , $ varNode ) ; } } }
Replace var elements in given definition

@param  DOMElement $node
@return array      $vars
Replace var elements in given definition