Inheritance: extends BaseIDType
Example #1
0
 /**
  * Convert this Issuer to XML.
  *
  * @param \DOMElement|null $parent The element we should append to.
  *
  * @return \DOMElement The current Issuer object converted into a \DOMElement.
  */
 public function toXML(\DOMElement $parent = null)
 {
     if ($this->Format !== Constants::NAMEID_ENTITY) {
         return parent::toXML($parent);
     }
     /*
      * From saml-core-2.0-os 8.3.6, when the entity Format is used: "The NameQualifier, SPNameQualifier, and
      * SPProvidedID attributes MUST be omitted."
      */
     if ($parent === null) {
         $parent = DOMDocumentFactory::create();
         $doc = $parent;
     } else {
         $doc = $parent->ownerDocument;
     }
     $element = $doc->createElementNS(Constants::NS_SAML, 'saml:Issuer');
     $parent->appendChild($element);
     $value = $element->ownerDocument->createTextNode($this->value);
     $element->appendChild($value);
     return $element;
 }