diff --git a/src/EncoderRegistry.php b/src/EncoderRegistry.php index 695e7fa..0d998b8 100644 --- a/src/EncoderRegistry.php +++ b/src/EncoderRegistry.php @@ -211,6 +211,19 @@ public function addBackedEnum(string $namespace, string $name, string $enumClass return $this; } + public function addBackedEnumClassMapCollection(ClassMapCollection $classMapCollection): self + { + foreach ($classMapCollection as $classMap) { + $this->addBackedEnum( + $classMap->getXmlNamespace(), + $classMap->getXmlType(), + $classMap->getPhpClassName() + ); + } + + return $this; + } + /** * @param non-empty-string $namespace * @param non-empty-string $name