/** * * @see \Brouwkuyp\Bundle\LogicBundle\Model\Equipment\EquipmentInterface::performTask() */ public function performTask(Phase $phase) { if ($phase->getType() == Phase::CONTROL_TEMP) { $this->setHeaterTemperature($phase->getValue()); } elseif ($phase->getType() == Phase::REACH_TEMP) { $this->startReceiving(); $this->amqpManager->wait(); $this->amqpManager->receive(); if ($this->getCurrentTemperature() > $phase->getValue()) { $this->eventDispatcher->dispatch(BrewEvents::PHASE_TEMPERATURE_REACHED, new PhaseTemperatureReachedEvent($phase)); $phase->setFinished(); } } }