public function __construct($user, SmsNotification $smsdata) { $this->queueUser = $user; $this->recipientNumber = $smsdata->getRecipientNo(); $this->sendStatus = $smsdata->getMesgStatus(); $this->smsText = $smsdata->getSmsText(); }
public function execute(AMQPMessage $msg) { $data = unserialize($msg->body); $entity = new SmsNotification($data["mesg"]); $entity->sendSmsNotification(); $em = $this->em; $entity2 = $em->getRepository('ExclusiveBooksDemoAppBundle:SmsAudit')->find($entity->GetId()); if (!$entity2) { //manage error } $entity2->setSendStatus($entity->getMesgStatus()); $entity2->setSendResult($entity->getMesgResult()); $entity2->setSendUser("RabbitMqBundle"); $em->flush(); }