public function channel($bind = []): Observable
    {
        $this->bunny = $this->bunny ?? new BaseAsynchClient($this->loop, $this->configuration);

        if (!\is_array($bind)) {
            $bind = \func_get_args();
        }

        return Observable::fromPromise(
            $this->bunny
                ->connect()
                ->then(function (BaseAsynchClient $client) {
                    return $client->channel();
                })
                ->then(function (Channel $channel) use ($bind) {
                    foreach ($bind as $obj) {
                        $obj->setChannel($channel);
                    }

                    return $channel;
                })
        );
    }
public function channel($bind = []): Observable
    {
        $this->bunny = $this->bunny ?? new BaseAsynchClient($this->loop, $this->configuration);

        if (!\is_array($bind)) {
            $bind = \func_get_args();
        }

        return Observable::fromPromise(
            $this->bunny
                ->connect()
                ->then(function (BaseAsynchClient $client) {
                    return $client->channel();
                })
                ->then(function (Channel $channel) use ($bind) {
                    foreach ($bind as $obj) {
                        $obj->setChannel($channel);
                    }

                    return $channel;
                })
        );
    }
public function channel ( $ bind = [ ] ) : Observable { $ this -> bunny = $ this -> bunny ?? new BaseAsynchClient ( $ this -> loop , $ this -> configuration ) ; if ( ! \ is_array ( $ bind ) ) { $ bind = \ func_get_args ( ) ; } return Observable :: fromPromise ( $ this -> bunny -> connect ( ) -> then ( function ( BaseAsynchClient $ client ) { return $ client -> channel ( ) ; } ) -> then ( function ( Channel $ channel ) use ( $ bind ) { foreach ( $ bind as $ obj ) { $ obj -> setChannel ( $ channel ) ; } return $ channel ; } ) ) ; }
Open a new channel and attribute it to given queues or exchanges.

@param Queue[]|Exchange[] $bind
Open a new channel and attribute it to given queues or exchanges .