ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 /*
46 *
47 * if $this->SAML2IssuerShowAll is set false
48 * From saml-core-2.0-os 8.3.6, when the entity Format is used: "The NameQualifier, SPNameQualifier, and
49 * SPProvidedID attributes MUST be omitted."
50 *
51 * if $this->SAML2IssuerShowAll is set true
52 * when the entity Format is used: "The NameQualifier, SPNameQualifier, and SPProvidedID attributes are not omitted"
53 * @see saml-core-2.0-os 8.3.6
54 *
55 * @var boolean
56 */
57 public $Saml2IssuerShowAll = false; //setting true break saml-core-2.0-os 8.3.6
58
59
60
68 public function toXML(\DOMElement $parent = null)
69 {
70
71 if ((($this->Saml2IssuerShowAll) && ($this->Format === Constants::NAMEID_ENTITY)) || ($this->Format !== Constants::NAMEID_ENTITY)) {
72 return parent::toXML($parent);
73 }
74
75 /*
76 * if $this->SAML2IssuerShowAll is set false
77 * From saml-core-2.0-os 8.3.6, when the entity Format is used: "The NameQualifier, SPNameQualifier, and
78 * SPProvidedID attributes MUST be omitted."
79 * if $this->SAML2IssuerShowAll is set true when the entity Format is used: "The NameQualifier, SPNameQualifier, and
80 * SPProvidedID attributes are not omitted."
81 */
82
83 if ($parent === null) {
85 $doc = $parent;
86 } else {
87 $doc = $parent->ownerDocument;
88 }
89 $element = $doc->createElementNS(Constants::NS_SAML, 'saml:Issuer');
90 $parent->appendChild($element);
91
92 $value = $element->ownerDocument->createTextNode($this->value);
93 $element->appendChild($value);
94
95 return $element;
96 }
97}
An exception for terminatinating execution or to throw for unit testing.
const NAMEID_ENTITY
Entity NameID format.
Definition: Constants.php:190
const NS_SAML
The namespace for the SAML 2 assertions.
Definition: Constants.php:225
toXML(\DOMElement $parent=null)
Convert this Issuer to XML.
Definition: Issuer.php:68