コード例 #1
0
 /**
  * @param \DOMElement $xml
  * @throws \AerialShip\LightSaml\Error\InvalidXmlException
  */
 function loadFromXml(\DOMElement $xml)
 {
     parent::loadFromXml($xml);
     if ($xml->hasAttribute('InResponseTo')) {
         $this->setInResponseTo($xml->getAttribute('InResponseTo'));
     }
     $this->iterateChildrenElements($xml, function (\DOMElement $node) {
         if ($node->localName == 'Status' && $node->namespaceURI == Protocol::SAML2) {
             $this->setStatus(new Status());
             $this->getStatus()->loadFromXml($node);
         }
     });
     if (!$this->getStatus()) {
         throw new InvalidXmlException('Missing Status element');
     }
 }