murph-skeleton/core/Factory/Site/Page/PageFactory.php

23 lines
420 B
PHP
Raw Normal View History

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