|
- <?php
-
- namespace domain\Product\Rotating;
-
- use domain\_\AbstractManager;
- use domain\Producer\Producer\Producer;
-
- class RotatingManager extends AbstractManager
- {
- protected RotatingBuilder $rotatingBuilder;
-
- public function loadDependencies(): void
- {
- $this->rotatingBuilder = $this->loadService(RotatingBuilder::class);
- }
-
- public function createRotating(Producer $producer, string $name, int $day): Rotating
- {
- $rotating = $this->rotatingBuilder->instanciateRotating($producer, $name, $day);
- $rotating->setName($name);
- $rotating->setDay($day);
- return $rotating;
- }
- }
|