27    public static function getList(\DOMElement $parent)
 
   32                'Scope' => 
'\SAML2\XML\shibmd\Scope',
 
   35                'EntityAttributes' => 
'\SAML2\XML\mdattr\EntityAttributes',
 
   37            MDRPI::NS_MDRPI => array(
 
   38                'RegistrationInfo' => 
'\SAML2\XML\mdrpi\RegistrationInfo',
 
   39                'PublicationInfo' => 
'\SAML2\XML\mdrpi\PublicationInfo',
 
   42                'UIInfo' => 
'\SAML2\XML\mdui\UIInfo',
 
   43                'DiscoHints' => 
'\SAML2\XML\mdui\DiscoHints',
 
   46                'DigestMethod' => 
'\SAML2\XML\alg\DigestMethod',
 
   47                'SigningMethod' => 
'\SAML2\XML\alg\SigningMethod',
 
   51        foreach (
Utils::xpQuery($parent, 
'./saml_metadata:Extensions/*') as $node) {
 
   52            if (array_key_exists($node->namespaceURI, $supported) &&
 
   53                array_key_exists($node->localName, $supported[$node->namespaceURI])
 
   55                $ret[] = 
new $supported[$node->namespaceURI][$node->localName]($node);
 
   70    public static function addList(\DOMElement $parent, array $extensions)
 
   72        if (empty($extensions)) {
 
   76        $extElement = $parent->ownerDocument->createElementNS(
Constants::NS_MD, 
'md:Extensions');
 
   77        $parent->appendChild($extElement);
 
   79        foreach ($extensions as $ext) {
 
   80            $ext->toXML($extElement);
 
An exception for terminatinating execution or to throw for unit testing.
const NS_MD
The namespace for the SAML 2 metadata.
static xpQuery(\DOMNode $node, $query)
Do an XPath query on an XML node.
static getList(\DOMElement $parent)
Get a list of Extensions in the given element.
static addList(\DOMElement $parent, array $extensions)
Add a list of Extensions to the given element.
const NS
The namespace used for the EntityAttributes extension.
const NS
The namespace used for the Scope extension element.