public function subscribe($topic, $callback, $options = null, $isFunction = false)
    {
        return $this->getSession()->subscribe(
            $this->prepareTopic($topic),
            $this->wrapWithProxy($callback, $isFunction),
            $options
        );
    }
public function subscribe($topic, $callback, $options = null, $isFunction = false)
    {
        return $this->getSession()->subscribe(
            $this->prepareTopic($topic),
            $this->wrapWithProxy($callback, $isFunction),
            $options
        );
    }
public function subscribe ( $ topic , $ callback , $ options = null , $ isFunction = false ) { return $ this -> getSession ( ) -> subscribe ( $ this -> prepareTopic ( $ topic ) , $ this -> wrapWithProxy ( $ callback , $ isFunction ) , $ options ) ; }
Subscribe to a topic and specify a callback for it.

@param string         $topic      The topic name.
@param string|Closure $callback   The callable to be called when the topic received a publish.
@param array          $options    Will be passed straight to thruway @see \Thruway\ClientSession::subscribe
@param bool           $isFunction Specify whether you're passing in a function from a different scope,
Set this to TRUE to avoid calling the passed callable from this provider's
scope.

@return \React\Promise\Promise

@see \Thruway\ClientSession::subscribe
Subscribe to a topic and specify a callback for it .