31 lines
536 B
PHP
31 lines
536 B
PHP
<?php
|
|
|
|
namespace Application\Generator;
|
|
|
|
use Faker\Factory;
|
|
use Faker\Generator;
|
|
|
|
class WebsiteObjectGenerator
|
|
{
|
|
/**
|
|
* @var Generator
|
|
*/
|
|
private Generator $generator;
|
|
|
|
public function __construct(private readonly string $seed)
|
|
{
|
|
$this->generator = Factory::create();
|
|
$this->getGenerator()->seed($this->seed);
|
|
}
|
|
|
|
protected function getGenerator(): Generator
|
|
{
|
|
return $this->generator;
|
|
}
|
|
|
|
protected function getSeed(): string
|
|
{
|
|
return $this->seed;
|
|
}
|
|
}
|