Ejemplo 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();
 }
Ejemplo 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;
 }