Kraken\Channel\ChannelComposite::setBus PHP Метод

setBus() публичный Метод

public setBus ( $name, $channel )
    public function setBus($name, $channel)
    {
        if (isset($this->buses[$name])) {
            throw new ResourceOccupiedException(sprintf("Channel [%s] has already registered bus [{$name}].", $this->getName()));
        }
        $this->buses[$name] = $channel;
        $this->events[$name] = $channel->copyEvents($this, ['connect', 'disconnect']);
        $this->events[$name][] = $channel->on('input', [$this, 'handleReceive']);
        return $this;
    }