|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /home/matalashes/www/kite.mata-lashes.com/vendor/endroid/qr-code/src/Builder/ |
Upload File : |
<?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;
}
}