src/Rxnet/RabbitMq/RabbitMq.php
public function channel($bind = [])
    {
        if (!is_array($bind)) {
            $bind = func_get_args();
        }
        return $this->bunny->connect()
            ->flatMap(function () {
                return $this->bunny->channel();
            })
            ->map(function (Channel $channel) use ($bind) {
                foreach ($bind as $obj) {
                    $obj->setChannel($channel);
                }
                return $channel;
            });
    }
public function channel($bind = [])
    {
        if (!is_array($bind)) {
            $bind = func_get_args();
        }
        return $this->bunny->connect()
            ->flatMap(function () {
                return $this->bunny->channel();
            })
            ->map(function (Channel $channel) use ($bind) {
                foreach ($bind as $obj) {
                    $obj->setChannel($channel);
                }
                return $channel;
            });
    }
public function channel ( $ bind = [ ] ) { if ( ! is_array ( $ bind ) ) { $ bind = func_get_args ( ) ; } return $ this -> bunny -> connect ( ) -> flatMap ( function ( ) { return $ this -> bunny -> channel ( ) ; } ) -> map ( 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 RabbitQueue[]|RabbitExchange[] $bind
@return Observable\AnonymousObservable
Open a new channel and attribute it to given queues or exchanges