Skip to content

Commit

Permalink
Merge pull request #30 from veewee/backed-enum-classmap
Browse files Browse the repository at this point in the history
Introduce backed-enum classmaps
  • Loading branch information
veewee authored Dec 20, 2024
2 parents b90da84 + 5334aa6 commit 293d588
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/EncoderRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 293d588

Please sign in to comment.