ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Issuer.php
Go to the documentation of this file.
1<?php
2
3namespace SAML2\XML\saml;
4
7
14class Issuer extends NameIDType
15{
16
37
43 protected $nodeName = 'saml:Issuer';
44
45
53 public function toXML(\DOMElement $parent = null)
54 {
55 if ($this->Format !== Constants::NAMEID_ENTITY) {
56 return parent::toXML($parent);
57 }
58
59 /*
60 * From saml-core-2.0-os 8.3.6, when the entity Format is used: "The NameQualifier, SPNameQualifier, and
61 * SPProvidedID attributes MUST be omitted."
62 */
63 if ($parent === null) {
65 $doc = $parent;
66 } else {
67 $doc = $parent->ownerDocument;
68 }
69 $element = $doc->createElementNS(Constants::NS_SAML, 'saml:Issuer');
70 $parent->appendChild($element);
71
72 $value = $element->ownerDocument->createTextNode($this->value);
73 $element->appendChild($value);
74
75 return $element;
76 }
77}
An exception for terminatinating execution or to throw for unit testing.
const NAMEID_ENTITY
Entity NameID format.
Definition: Constants.php:185
const NS_SAML
The namespace for the SAML 2 assertions.
Definition: Constants.php:220
toXML(\DOMElement $parent=null)
Convert this Issuer to XML.
Definition: Issuer.php:53