2021-03-24 19:10:26 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Core\Factory\Site\Page;
|
|
|
|
|
|
|
|
use App\Core\Entity\Site\Page\Page;
|
2021-05-12 12:04:03 +02:00
|
|
|
use App\Core\Factory\FactoryInterface;
|
2021-03-24 19:10:26 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* class PageFactory.
|
|
|
|
*
|
|
|
|
* @author Simon Vieille <simon@deblan.fr>
|
|
|
|
*/
|
2021-05-12 12:04:03 +02:00
|
|
|
class PageFactory implements FactoryInterface
|
2021-03-24 19:10:26 +01:00
|
|
|
{
|
|
|
|
public function create(string $className, string $name): Page
|
|
|
|
{
|
|
|
|
$entity = new $className();
|
|
|
|
$entity->setName($name);
|
|
|
|
|
|
|
|
return $entity;
|
|
|
|
}
|
|
|
|
}
|