src/LightSaml/Model/Protocol/AuthnRequest.php
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);
    }
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);
    }
@param \DOMNode             $parent
@param SerializationContext $context

@return void