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.

24 lines
630B

  1. <?php
  2. namespace domain\Product\Rotating;
  3. use domain\_\AbstractManager;
  4. use domain\Producer\Producer\Producer;
  5. class RotatingManager extends AbstractManager
  6. {
  7. protected RotatingBuilder $rotatingBuilder;
  8. public function loadDependencies(): void
  9. {
  10. $this->rotatingBuilder = $this->loadService(RotatingBuilder::class);
  11. }
  12. public function createRotating(Producer $producer, string $name, int $day): Rotating
  13. {
  14. $rotating = $this->rotatingBuilder->instanciateRotating($producer, $name, $day);
  15. $rotating->setName($name);
  16. $rotating->setDay($day);
  17. return $rotating;
  18. }
  19. }