first commit

This commit is contained in:
Your Name
2026-01-19 14:19:22 +08:00
commit fe2d9c1868
4777 changed files with 665503 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Endroid\QrCode\Builder;
final class BuilderRegistry implements BuilderRegistryInterface
{
/** @var array<BuilderInterface> */
private array $builders = [];
public function getBuilder(string $name): BuilderInterface
{
if (!isset($this->builders[$name])) {
throw new \Exception(sprintf('Builder with name "%s" not available from registry', $name));
}
return $this->builders[$name];
}
public function addBuilder(string $name, BuilderInterface $builder): void
{
$this->builders[$name] = $builder;
}
}