ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ArtifactResponse.php
Go to the documentation of this file.
1<?php
2
3namespace SAML2;
4
12{
19 private $any;
20
21
22 public function __construct(\DOMElement $xml = null)
23 {
24 parent::__construct('ArtifactResponse', $xml);
25
26 if (!is_null($xml)) {
27 $status = Utils::xpQuery($xml, './saml_protocol:Status');
28 assert(!empty($status)); /* Will have failed during StatusResponse parsing. */
29
30 $status = $status[0];
31
32 for ($any = $status->nextSibling; $any !== null; $any = $any->nextSibling) {
33 if ($any instanceof \DOMElement) {
34 $this->any = $any;
35 break;
36 }
37 /* Ignore comments and text nodes. */
38 }
39 }
40 }
41
42 public function setAny(\DOMElement $any = null)
43 {
44 $this->any = $any;
45 }
46
47 public function getAny()
48 {
49 return $this->any;
50 }
51
57 public function toUnsignedXML()
58 {
59 $root = parent::toUnsignedXML();
60 if (isset($this->any)) {
61 $node = $root->ownerDocument->importNode($this->any, true);
62 $root->appendChild($node);
63 }
64
65 return $root;
66 }
67}
An exception for terminatinating execution or to throw for unit testing.
toUnsignedXML()
Convert the response message to an XML element.
setAny(\DOMElement $any=null)
__construct(\DOMElement $xml=null)
$root
Definition: sabredav.php:45