|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Distribution;
-
- use Lc\CaracoleBundle\Container\Distribution\DistributionContainer;
- use Lc\CaracoleBundle\Model\Distribution\DistributionInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class DistributionFactory extends AbstractFactory
- {
-
- public function create(int $cycleNumber, int $year, string $cycleType):DistributionInterface
- {
- $class = DistributionContainer::getEntityFqcn();
- $distribution = new $class;
-
- $distribution->setCycleNumber($cycleNumber);
- $distribution->setCycleType($cycleType);
- $distribution->setYear($year);
-
- return $distribution;
- }
-
- }
|