src/PubSub/DispatcherLoop.php
public function attachCallback($channel, $callback)
    {
        $callbackName = $this->getPrefixKeys().$channel;

        $this->assertCallback($callback);
        $this->callbacks[$callbackName] = $callback;
        $this->pubsub->subscribe($channel);
    }
public function attachCallback($channel, $callback)
    {
        $callbackName = $this->getPrefixKeys().$channel;

        $this->assertCallback($callback);
        $this->callbacks[$callbackName] = $callback;
        $this->pubsub->subscribe($channel);
    }
public function attachCallback ( $ channel , $ callback ) { $ callbackName = $ this -> getPrefixKeys ( ) . $ channel ; $ this -> assertCallback ( $ callback ) ; $ this -> callbacks [ $ callbackName ] = $ callback ; $ this -> pubsub -> subscribe ( $ channel ) ; }
Binds a callback to a channel.

@param string   $channel  Channel name.
@param callable $callback A callback.
Binds a callback to a channel .