🎉 initial commit
This commit is contained in:
30
classes/Application/Generator/WebsiteObjectGenerator.php
Normal file
30
classes/Application/Generator/WebsiteObjectGenerator.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user