public static function createSubscriptionFromSubscribeMessage(Session $session, SubscribeMessage $msg)
    {
        $options      = $msg->getOptions();
        $subscription = new Subscription($msg->getTopicName(), $session, $options);

        if (isset($options->disclose_publisher) && $options->disclose_publisher === true) {
            $subscription->setDisclosePublisher(true);
        }

        return $subscription;
    }
public static function createSubscriptionFromSubscribeMessage(Session $session, SubscribeMessage $msg)
    {
        $options      = $msg->getOptions();
        $subscription = new Subscription($msg->getTopicName(), $session, $options);

        if (isset($options->disclose_publisher) && $options->disclose_publisher === true) {
            $subscription->setDisclosePublisher(true);
        }

        return $subscription;
    }
public static function createSubscriptionFromSubscribeMessage ( Session $ session , SubscribeMessage $ msg ) { $ options = $ msg -> getOptions ( ) ; $ subscription = new Subscription ( $ msg -> getTopicName ( ) , $ session , $ options ) ; if ( isset ( $ options -> disclose_publisher ) && $ options -> disclose_publisher === true ) { $ subscription -> setDisclosePublisher ( true ) ; } return $ subscription ; }
Create Subscription from SubscribeMessage

@param Session $session
@param SubscribeMessage $msg
@return Subscription
Create Subscription from SubscribeMessage