public function addOption($root, $name, $value)
    {
        if (isset($value)) {
            $elem = $this->dom->createElement($name);
            $elem->nodeValue = $value;
            $root->appendChild($elem);
        }
    }
public function addOption($root, $name, $value)
    {
        if (isset($value)) {
            $elem = $this->dom->createElement($name);
            $elem->nodeValue = $value;
            $root->appendChild($elem);
        }
    }
public function addOption ( $ root , $ name , $ value ) { if ( isset ( $ value ) ) { $ elem = $ this -> dom -> createElement ( $ name ) ; $ elem -> nodeValue = $ value ; $ root -> appendChild ( $ elem ) ; } }
If an option value is set, create a DOM element with an option name
and value and append it to the root element of the options node.

@param DOMElement $root The root element of the options node.
@param string $name The element name (option name).
@param string $value The node value.
If an option value is set create a DOM element with an option name and value and append it to the root element of the options node .