You are here

public function XMLSecurityDSig::__construct in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

Parameters

string $prefix:

File

includes/XMLSecurityKey.php, line 811

Class

XMLSecurityDSig

Code

public function __construct($prefix = 'ds') {
  $template = self::BASE_TEMPLATE;
  if (!empty($prefix)) {
    $this->prefix = $prefix . ':';
    $search = array(
      "<S",
      "</S",
      "xmlns=",
    );
    $replace = array(
      "<{$prefix}:S",
      "</{$prefix}:S",
      "xmlns:{$prefix}=",
    );
    $template = str_replace($search, $replace, $template);
  }
  $sigdoc = new DOMDocument();
  $sigdoc
    ->loadXML($template);
  $this->sigNode = $sigdoc->documentElement;
}