You are here

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

Parameters

string $prefix:

File

src/XMLSecurityKey.php, line 778

Class

XMLSecurityDSig

Namespace

Drupal\miniorange_saml

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;
}