/** * @param \DOMNode $parent * @param SerializationContext $context */ public function serialize(\DOMNode $parent, SerializationContext $context) { $result = $this->createElement('LogoutRequest', SamlConstants::NS_PROTOCOL, $parent, $context); parent::serialize($result, $context); $this->attributesToXml(array('Reason', 'NotOnOrAfter'), $result); $this->singleElementsToXml(array('NameID', 'SessionIndex'), $result, $context, SamlConstants::NS_PROTOCOL); // must be last in order signature to include them all $this->singleElementsToXml(array('Signature'), $result, $context); }
/** * @param \DOMNode $parent * @param SerializationContext $context * * @return void */ public function serialize(\DOMNode $parent, SerializationContext $context) { $result = $this->createElement('AuthnRequest', SamlConstants::NS_PROTOCOL, $parent, $context); parent::serialize($result, $context); $this->attributesToXml(array('ForceAuthn', 'IsPassive', 'ProtocolBinding', 'AssertionConsumerServiceIndex', 'AssertionConsumerServiceURL', 'AttributeConsumingServiceIndex', 'ProviderName'), $result); $this->singleElementsToXml(array('Subject', 'NameIDPolicy', 'Conditions'), $result, $context); // must be last in order signature to include them all $this->singleElementsToXml(array('Signature'), $result, $context); }