diff options
author | Olav Morken <olav.morken@uninett.no> | 2013-11-15 09:34:07 +0000 |
---|---|---|
committer | Olav Morken <olav.morken@uninett.no> | 2013-11-15 09:34:07 +0000 |
commit | 6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc (patch) | |
tree | f1d6c78ab5e2eec5f8b8121f9e1a838c28997fa6 /lib/SAML2/XML/mdattr | |
parent | e9c98e008ed7dbb5d642aa4788edd2510c952ca1 (diff) | |
download | simplesamlphp-6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc.zip simplesamlphp-6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc.tar.gz simplesamlphp-6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc.tar.bz2 |
Start using SAML2 library from GitHub.
This patch also starts using Composer for other dependencies
(i.e. php-openid and xmlseclibs).
Thanks to Boy Baukema for implementing this!
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3290 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SAML2/XML/mdattr')
-rw-r--r-- | lib/SAML2/XML/mdattr/EntityAttributes.php | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/lib/SAML2/XML/mdattr/EntityAttributes.php b/lib/SAML2/XML/mdattr/EntityAttributes.php deleted file mode 100644 index 9359008..0000000 --- a/lib/SAML2/XML/mdattr/EntityAttributes.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -/** - * Class for handling the EntityAttributes metadata extension. - * - * @link: http://docs.oasis-open.org/security/saml/Post2.0/sstc-metadata-attr-cs-01.pdf - * @package simpleSAMLphp - * @version $Id$ - */ -class SAML2_XML_mdattr_EntityAttributes { - - /** - * The namespace used for the EntityAttributes extension. - */ - const NS = 'urn:oasis:names:tc:SAML:metadata:attribute'; - - - /** - * Array with child elements. - * - * The elements can be SAML2_XML_saml_Attribute or SAML2_XML_Chunk elements. - * - * @var array - */ - public $children; - - - /** - * Create a EntityAttributes element. - * - * @param DOMElement|NULL $xml The XML element we should load. - */ - public function __construct(DOMElement $xml = NULL) { - - if ($xml === NULL) { - return; - } - - foreach (SAML2_Utils::xpQuery($xml, './saml_assertion:Attribute|./saml_assertion:Assertion') as $node) { - if ($node->localName === 'Attribute') { - $this->children[] = new SAML2_XML_saml_Attribute($node); - } else { - $this->children[] = new SAML2_XML_Chunk($node); - } - } - - } - - - /** - * Convert this EntityAttributes to XML. - * - * @param DOMElement $parent The element we should append to. - */ - public function toXML(DOMElement $parent) { - assert('is_array($this->children)'); - - $doc = $parent->ownerDocument; - - $e = $doc->createElementNS(SAML2_XML_mdattr_EntityAttributes::NS, 'mdattr:EntityAttributes'); - $parent->appendChild($e); - - if (!empty($this->children)) { - foreach ($this->children as $child) { - $child->toXML($e); - } - } - - return $e; - } - -} |