protected function createElement($nodeName, $textContent = '')
	{
		$methodName = 'createElement';
		$args       = [$nodeName];

		// Add the text content for the new element
		if ($textContent !== '')
		{
			$args[] = htmlspecialchars($textContent, ENT_NOQUOTES, 'UTF-8');
		}

		// Handle namespaced elements
		$prefix = strstr($nodeName, ':', true);
		if ($prefix > '')
		{
			$methodName .= 'NS';
			array_unshift($args, $this->ownerDocument->lookupNamespaceURI($prefix));
		}

		return call_user_func_array([$this->ownerDocument, $methodName], $args);
	}
protected function createElement($nodeName, $textContent = '')
	{
		$methodName = 'createElement';
		$args       = [$nodeName];

		// Add the text content for the new element
		if ($textContent !== '')
		{
			$args[] = htmlspecialchars($textContent, ENT_NOQUOTES, 'UTF-8');
		}

		// Handle namespaced elements
		$prefix = strstr($nodeName, ':', true);
		if ($prefix > '')
		{
			$methodName .= 'NS';
			array_unshift($args, $this->ownerDocument->lookupNamespaceURI($prefix));
		}

		return call_user_func_array([$this->ownerDocument, $methodName], $args);
	}
protected function createElement ( $ nodeName , $ textContent = '' ) { $ methodName = 'createElement' ; $ args = [ $ nodeName ] ; // Add the text content for the new element if ( $ textContent !== '' ) { $ args [ ] = htmlspecialchars ( $ textContent , ENT_NOQUOTES , 'UTF-8' ) ; } // Handle namespaced elements $ prefix = strstr ( $ nodeName , ':' , true ) ; if ( $ prefix > '' ) { $ methodName .= 'NS' ; array_unshift ( $ args , $ this -> ownerDocument -> lookupNamespaceURI ( $ prefix ) ) ; } return call_user_func_array ( [ $ this -> ownerDocument , $ methodName ] , $ args ) ; }
Create an element in current template

@param  string     $nodeName
@param  string     $textContent
@return DOMElement
Create an element in current template