@@ 74-83 (lines=10) @@ | ||
71 | ||
72 | $rootElementName = $node->localName; |
|
73 | ||
74 | if (array_key_exists($rootElementName, $map)) { |
|
75 | if ($class = $map[$rootElementName]) { |
|
76 | /** @var SamlElementInterface $result */ |
|
77 | $result = new $class(); |
|
78 | } else { |
|
79 | throw new \LogicException('Deserialization of %s root element is not implemented'); |
|
80 | } |
|
81 | } else { |
|
82 | throw new LightSamlXmlException(sprintf("Unknown SAML metadata '%s'", $rootElementName)); |
|
83 | } |
|
84 | ||
85 | $result->deserialize($node, $context); |
|
86 |
@@ 94-103 (lines=10) @@ | ||
91 | ||
92 | $rootElementName = $node->localName; |
|
93 | ||
94 | if (array_key_exists($rootElementName, $map)) { |
|
95 | if ($class = $map[$rootElementName]) { |
|
96 | /** @var SamlElementInterface $result */ |
|
97 | $result = new $class(); |
|
98 | } else { |
|
99 | throw new \LogicException('Deserialization of %s root element is not implemented'); |
|
100 | } |
|
101 | } else { |
|
102 | throw new LightSamlXmlException(sprintf("Unknown SAML message '%s'", $rootElementName)); |
|
103 | } |
|
104 | ||
105 | $result->deserialize($node, $context); |
|
106 |