Exemplo n.º 1
0
 /**
  * @param string $body
  * @param array $properties
  */
 public function __construct($body = '', array $properties)
 {
     // Override MessageInterface::PROPERTY_TYPE
     $properties[MessageInterface::PROPERTY_TYPE] = MessageInterface::TYPE_RPC_REQUEST;
     // Generate a correlation id if not provided
     if (!isset($properties[MessageInterface::PROPERTY_CORRELATION_ID])) {
         $properties[MessageInterface::PROPERTY_CORRELATION_ID] = $this->generateCorrelationId();
     }
     $this->checkRequiredPropertiesPresence($properties);
     parent::__construct($body, $properties);
 }
Exemplo n.º 2
0
 /**
  * @param string $body
  * @param array $properties
  */
 public function __construct($body = '', array $properties)
 {
     // Override MessageInterface::PROPERTY_TYPE
     $properties[MessageInterface::PROPERTY_TYPE] = MessageInterface::TYPE_RPC_RESPONSE;
     parent::__construct($body, $properties);
 }