public function XMLSecurityDSig::insertSignature in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7
This function inserts the signature element.
The signature element will be appended to the element, unless $beforeNode is specified. If $beforeNode is specified, the signature element will be inserted as the last element before $beforeNode.
Parameters
DOMNode $node The node the signature element should be inserted into.:
DOMNode $beforeNode The node the signature element should be located before.:
Return value
DOMNode The signature element node
1 call to XMLSecurityDSig::insertSignature()
- XMLSecurityDSig::appendSignature in includes/
XMLSecurityKey.php
File
- includes/
XMLSecurityKey.php, line 1582
Class
Code
public function insertSignature($node, $beforeNode = null) {
$document = $node->ownerDocument;
$signatureElement = $document
->importNode($this->sigNode, true);
if ($beforeNode == null) {
return $node
->insertBefore($signatureElement);
}
else {
return $node
->insertBefore($signatureElement, $beforeNode);
}
}