summaryrefslogtreecommitdiffstats
path: root/inc/simplesamlphp/lib/SAML2/XML/shibmd/Scope.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/simplesamlphp/lib/SAML2/XML/shibmd/Scope.php')
-rw-r--r--inc/simplesamlphp/lib/SAML2/XML/shibmd/Scope.php74
1 files changed, 0 insertions, 74 deletions
diff --git a/inc/simplesamlphp/lib/SAML2/XML/shibmd/Scope.php b/inc/simplesamlphp/lib/SAML2/XML/shibmd/Scope.php
deleted file mode 100644
index 9847546..0000000
--- a/inc/simplesamlphp/lib/SAML2/XML/shibmd/Scope.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * Class which represents the Scope element found in Shibboleth metadata.
- *
- * @link https://wiki.shibboleth.net/confluence/display/SHIB/ShibbolethMetadataProfile
- * @package simpleSAMLphp
- * @version $Id$
- */
-class SAML2_XML_shibmd_Scope {
-
- /**
- * The namespace used for the Scope extension element.
- */
- const NS = 'urn:mace:shibboleth:metadata:1.0';
-
-
- /**
- * The scope.
- *
- * @var string
- */
- public $scope;
-
- /**
- * Whether this is a regexp scope.
- *
- * @var bool|NULL
- */
- public $regexp = NULL;
-
-
- /**
- * Create a Scope.
- *
- * @param DOMElement|NULL $xml The XML element we should load.
- */
- public function __construct(DOMElement $xml = NULL) {
-
- if ($xml === NULL) {
- return;
- }
-
- $this->scope = $xml->textContent;
- $this->regexp = SAML2_Utils::parseBoolean($xml, 'regexp', NULL);
- }
-
-
- /**
- * Convert this Scope to XML.
- *
- * @param DOMElement $parent The element we should append this Scope to.
- */
- public function toXML(DOMElement $parent) {
- assert('is_string($this->scope)');
- assert('is_bool($this->regexp) || is_null($this->regexp)');
-
- $doc = $parent->ownerDocument;
-
- $e = $doc->createElementNS(SAML2_XML_shibmd_Scope::NS, 'shibmd:Scope');
- $parent->appendChild($e);
-
- $e->appendChild($doc->createTextNode($this->scope));
-
- if ($this->regexp === TRUE) {
- $e->setAttribute('regexp', 'true');
- } elseif ($this->regexp === FALSE) {
- $e->setAttribute('regexp', 'false');
- }
-
- return $e;
- }
-
-}