/** * @param PublishMessage $msg * @return static */ public static function createFromPublishMessage(PublishMessage $msg) { return new static($msg->getTopicName(), $msg->getRequestId(), new \stdClass(), $msg->getArguments(), $msg->getArgumentsKw()); }
/** * Create event message from publish message * * @param \Thruway\Message\PublishMessage $msg * @param int $subscriptionId * @return \Thruway\Message\EventMessage */ public static function createFromPublishMessage(PublishMessage $msg, $subscriptionId) { return new static($subscriptionId, $msg->getRequestId(), $msg->getOptions(), $msg->getArguments(), $msg->getArgumentsKw()); }