mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-25 17:45:35 +03:00
25 lines
510 B
PHP
25 lines
510 B
PHP
<?php
|
|
|
|
namespace Ramsey\Uuid\Builder;
|
|
|
|
use Ramsey\Uuid\Converter\NumberConverterInterface;
|
|
use Ramsey\Uuid\CodecInterface;
|
|
use Ramsey\Uuid\Uuid;
|
|
use Ramsey\Uuid\UuidBuilder;
|
|
|
|
class DefaultUuidBuilder implements UuidBuilder
|
|
{
|
|
|
|
private $converter;
|
|
|
|
public function __construct(NumberConverterInterface $converter)
|
|
{
|
|
$this->converter = $converter;
|
|
}
|
|
|
|
public function build(CodecInterface $codec, array $fields)
|
|
{
|
|
return new Uuid($fields, $this->converter, $codec);
|
|
}
|
|
}
|