33 assert(is_string($value) || $value instanceof \
DOMElement);
35 if (is_string($value)) {
39 $this->element->appendChild($doc->createTextNode($value));
48 if ($value->namespaceURI ===
Constants::NS_SAML && $value->localName ===
'AttributeValue') {
49 $this->element = Utils::copyElement($value);
56 Utils::copyElement($value, $this->element);
68 assert($this->element->namespaceURI === \
SAML2\
Constants::NS_SAML && $this->element->localName ===
"AttributeValue");
70 $v = Utils::copyElement($this->element, $parent);
80 return $this->element->textContent;
94 $doc = $this->element->ownerDocument;
97 foreach ($this->element->childNodes as
$c) {
98 $ret .= $doc->saveXML($c);
112 return serialize($this->element->ownerDocument->saveXML($this->element));
124 $this->element = $doc->documentElement;
serialize()
Serialize this AttributeValue.
__construct($value)
Create an AttributeValue.
getString()
Returns a plain text content of the attribute value.
const NS_XS
The namespace fox XML schema.
const NS_XSI
The namespace for XML schema instance.
toXML(\DOMElement $parent)
Append this attribute value to an element.
unserialize($serialized)
Un-serialize this AttributeValue.
__toString()
Convert this attribute value to a string.
const NS_SAML
The namespace for the SAML 2 assertions.