src/LightSaml/Model/Assertion/Assertion.php
public function serialize(\DOMNode $parent, SerializationContext $context)
    {
        $this->prepareForXml();

        $result = $this->createElement('Assertion', SamlConstants::NS_ASSERTION, $parent, $context);

        $this->attributesToXml(array('ID', 'Version', 'IssueInstant'), $result);

        $this->singleElementsToXml(
            array('Issuer', 'Subject', 'Conditions'),
            $result,
            $context
        );

        foreach ($this->items as $item) {
            $item->serialize($result, $context);
        }

        // must be added at the end
        $this->singleElementsToXml(array('Signature'), $result, $context);
    }
public function serialize(\DOMNode $parent, SerializationContext $context)
    {
        $this->prepareForXml();

        $result = $this->createElement('Assertion', SamlConstants::NS_ASSERTION, $parent, $context);

        $this->attributesToXml(array('ID', 'Version', 'IssueInstant'), $result);

        $this->singleElementsToXml(
            array('Issuer', 'Subject', 'Conditions'),
            $result,
            $context
        );

        foreach ($this->items as $item) {
            $item->serialize($result, $context);
        }

        // must be added at the end
        $this->singleElementsToXml(array('Signature'), $result, $context);
    }
@param \DOMNode             $parent
@param SerializationContext $context

@return void