ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
X509Data.php
Go to the documentation of this file.
1
<?php
2
3
namespace
SAML2\XML\ds
;
4
5
use
RobRichards\XMLSecLibs\XMLSecurityDSig
;
6
use
SAML2\XML\Chunk
;
7
13
class
X509Data
14
{
23
public
$data
=
array
();
24
30
public
function
__construct
(\
DOMElement
$xml
= null)
31
{
32
if
(
$xml
=== null) {
33
return
;
34
}
35
36
for
(
$n
=
$xml
->firstChild;
$n
!== null;
$n
=
$n
->nextSibling) {
37
if
(!(
$n
instanceof \
DOMElement
)) {
38
continue
;
39
}
40
41
if
(
$n
->namespaceURI !==
XMLSecurityDSig::XMLDSIGNS
) {
42
$this->
data
[] =
new
Chunk
(
$n
);
43
continue
;
44
}
45
switch
(
$n
->localName) {
46
case
'X509Certificate'
:
47
$this->
data
[] =
new
X509Certificate
(
$n
);
48
break
;
49
default
:
50
$this->
data
[] =
new
Chunk
(
$n
);
51
break
;
52
}
53
}
54
}
55
62
public
function
toXML(\
DOMElement
$parent)
63
{
64
assert(is_array($this->
data
));
65
66
$doc = $parent->ownerDocument;
67
68
$e = $doc->createElementNS(
XMLSecurityDSig::XMLDSIGNS
,
'ds:X509Data'
);
69
$parent->appendChild($e);
70
72
foreach
($this->
data
as
$n
) {
73
$n->toXML($e);
74
}
75
76
return
$e;
77
}
78
}
RobRichards\XMLSecLibs\XMLSecurityDSig\XMLDSIGNS
const XMLDSIGNS
Definition:
XMLSecurityDSig.php:53
data
Add some data
Definition:
01pharSimple.php:56
SAML2\XML\ds\X509Data
Definition:
X509Data.php:13
SAML2\XML\ds\X509Data\__construct
__construct(\DOMElement $xml=null)
Initialize a X509Data.
Definition:
X509Data.php:30
SAML2\XML\Chunk
Definition:
Chunk.php:13
SAML2\XML\ds\X509Certificate
Definition:
X509Certificate.php:13
Chunk
$xml
$xml
Definition:
metadata.php:240
DOMElement
$n
$n
Definition:
RandomTest.php:85
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
SAML2\XML\ds\X509Data\$data
$data
Definition:
X509Data.php:23
SAML2\XML\ds
Definition:
KeyInfo.php:3
XMLSecurityDSig
libs
composer
vendor
simplesamlphp
saml2
src
SAML2
XML
ds
X509Data.php
Generated on Sat Jan 18 2025 19:01:09 for ILIAS by
1.8.13 (using
Doxyfile
)