Skip to content

Commit

Permalink
Fix registry key
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jan 28, 2025
1 parent 4e63c05 commit 795122f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/SAML11/Compat/AbstractContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

abstract class AbstractContainer
{
/** @var string */
private const XSI_TYPE_PREFIX = '<xsi:type>';

/** @var array */
protected array $registry = [];

Expand Down Expand Up @@ -56,7 +53,7 @@ public function registerExtensionHandler(string $class): void
{
Assert::subclassOf($class, AbstractElement::class);
if (is_subclass_of($class, ExtensionPointInterface::class, true)) {
$key = implode(':', [self::XSI_TYPE_PREFIX, $class::getXsiTypeNamespaceURI(), $class::getXsiTypeName()]);
$key = '{' . $class::getXsiTypeNamespaceURI() . '}' . $class::getXsiTypePrefix() . ':' . $class::getXsiTypeName();
} else {
$className = AbstractElement::getClassName($class);
$key = ($class::NS === null) ? $className : implode(':', [$class::NS, $className]);
Expand Down Expand Up @@ -106,7 +103,6 @@ public function getExtensionHandler(QNameValue $qName): ?string
$namespaceURI = $qName->getNamespaceURI()->getValue();

if ($namespaceURI !== null) {
$localName = $qName->getLocalName()->getValue();
$key = $qName->getRawValue();
if (array_key_exists($key, $this->registry) === true) {
Assert::implementsInterface($this->registry[$key], ExtensionPointInterface::class);
Expand Down

0 comments on commit 795122f

Please sign in to comment.