Esempio n. 1
0
 /**
  * SuccessPublisherEvent constructor.
  *
  * @param PublisherEventInterface $event
  */
 public function __construct(PublisherEventInterface $event)
 {
     $this->message = $event->getMessage();
     $this->routingKey = $event->getRoutingKey();
     $this->attributes = $event->getAttributes();
     $this->flags = $event->getFlags();
 }
Esempio n. 2
0
 /**
  * FailedPublisherEvent constructor.
  *
  * @param PublisherEventInterface $event
  * @param \Exception              $exception
  * @param Publisher               $publisher
  */
 public function __construct(PublisherEventInterface $event, \Exception $exception = null, Publisher $publisher)
 {
     $this->event = $event;
     $this->catched = false;
     $this->message = $event->getMessage();
     $this->routingKey = $event->getRoutingKey();
     $this->attributes = $event->getAttributes();
     $this->flags = $event->getFlags();
     $this->exception = $exception;
     $this->publisher = $publisher;
 }