summaryrefslogtreecommitdiffstats
path: root/lib/SAML2/XML/md/Extensions.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SAML2/XML/md/Extensions.php')
-rw-r--r--lib/SAML2/XML/md/Extensions.php62
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/SAML2/XML/md/Extensions.php b/lib/SAML2/XML/md/Extensions.php
deleted file mode 100644
index 797bdaf..0000000
--- a/lib/SAML2/XML/md/Extensions.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/**
- * Class for handling SAML2 metadata extensions.
- *
- * @package simpleSAMLphp
- * @version $Id$
- */
-class SAML2_XML_md_Extensions {
-
- /**
- * Get a list of Extensions in the given element.
- *
- * @param DOMElement $parent The element that may contain the md:Extensions element.
- * @return array Array of extensions.
- */
- public static function getList(DOMElement $parent) {
-
- $ret = array();
- foreach (SAML2_Utils::xpQuery($parent, './saml_metadata:Extensions/*') as $node) {
- if ($node->namespaceURI === SAML2_XML_shibmd_Scope::NS && $node->localName === 'Scope') {
- $ret[] = new SAML2_XML_shibmd_Scope($node);
- } elseif ($node->namespaceURI === SAML2_XML_mdattr_EntityAttributes::NS && $node->localName === 'EntityAttributes') {
- $ret[] = new SAML2_XML_mdattr_EntityAttributes($node);
- } elseif ($node->namespaceURI === SAML2_XML_mdrpi_Common::NS_MDRPI && $node->localName === 'RegistrationInfo') {
- $ret[] = new SAML2_XML_mdrpi_RegistrationInfo($node);
- } elseif ($node->namespaceURI === SAML2_XML_mdrpi_Common::NS_MDRPI && $node->localName === 'PublicationInfo') {
- $ret[] = new SAML2_XML_mdrpi_PublicationInfo($node);
- } elseif ($node->namespaceURI === SAML2_XML_mdui_UIInfo::NS && $node->localName === 'UIInfo') {
- $ret[] = new SAML2_XML_mdui_UIInfo($node);
- } elseif ($node->namespaceURI === SAML2_XML_mdui_DiscoHints::NS && $node->localName === 'DiscoHints') {
- $ret[] = new SAML2_XML_mdui_DiscoHints($node);
- } else {
- $ret[] = new SAML2_XML_Chunk($node);
- }
- }
-
- return $ret;
- }
-
-
- /**
- * Add a list of Extensions to the given element.
- *
- * @param DOMElement $parent The element we should add the extensions to.
- * @param array $extensions List of extension objects.
- */
- public static function addList(DOMElement $parent, array $extensions) {
-
- if (empty($extensions)) {
- return;
- }
-
- $extElement = $parent->ownerDocument->createElementNS(SAML2_Const::NS_MD, 'md:Extensions');
- $parent->appendChild($extElement);
-
- foreach ($extensions as $ext) {
- $ext->toXML($extElement);
- }
- }
-
-}