You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
664B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Distribution;
  3. use Lc\CaracoleBundle\Container\Distribution\DistributionContainer;
  4. use Lc\CaracoleBundle\Model\Distribution\DistributionInterface;
  5. use Lc\SovBundle\Factory\AbstractFactory;
  6. class DistributionFactory extends AbstractFactory
  7. {
  8. public function create(int $cycleNumber, int $year, string $cycleType):DistributionInterface
  9. {
  10. $class = DistributionContainer::getEntityFqcn();
  11. $distribution = new $class;
  12. $distribution->setCycleNumber($cycleNumber);
  13. $distribution->setCycleType($cycleType);
  14. $distribution->setYear($year);
  15. return $distribution;
  16. }
  17. }