Files
newspage/classes/Application/Generator/WebsiteObjectGenerator.php
2024-10-07 22:58:27 +02:00

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;
}
}