public function toXML(DOMElement $parent) : DOMElement
    {
        Assert::notEmpty($this->scope);

        $doc = $parent->ownerDocument;

        $e = $doc->createElementNS(Scope::NS, 'shibmd:Scope');
        $parent->appendChild($e);

        $e->appendChild($doc->createTextNode($this->scope));

        if ($this->regexp === true) {
            $e->setAttribute('regexp', 'true');
        } else {
            $e->setAttribute('regexp', 'false');
        }

        return $e;
    }
public function toXML(DOMElement $parent) : DOMElement
    {
        Assert::notEmpty($this->scope);

        $doc = $parent->ownerDocument;

        $e = $doc->createElementNS(Scope::NS, 'shibmd:Scope');
        $parent->appendChild($e);

        $e->appendChild($doc->createTextNode($this->scope));

        if ($this->regexp === true) {
            $e->setAttribute('regexp', 'true');
        } else {
            $e->setAttribute('regexp', 'false');
        }

        return $e;
    }
public function toXML ( DOMElement $ parent ) : DOMElement { Assert :: notEmpty ( $ this -> scope ) ; $ doc = $ parent -> ownerDocument ; $ e = $ doc -> createElementNS ( Scope :: NS , 'shibmd:Scope' ) ; $ parent -> appendChild ( $ e ) ; $ e -> appendChild ( $ doc -> createTextNode ( $ this -> scope ) ) ; if ( $ this -> regexp === true ) { $ e -> setAttribute ( 'regexp' , 'true' ) ; } else { $ e -> setAttribute ( 'regexp' , 'false' ) ; } return $ e ; }
Convert this Scope to XML.

@param \DOMElement $parent The element we should append this Scope to.
@return \DOMElement
Convert this Scope to XML .