PhpAmqpLib/Channel/AMQPChannel.php
public function close($reply_code = 0, $reply_text = '', $method_sig = array(0, 0))
    {
        $this->callbacks = array();
        if ($this->is_open === false || $this->connection === null) {
            $this->do_close();

            return null; // already closed
        }
        list($class_id, $method_id, $args) = $this->protocolWriter->channelClose(
            $reply_code,
            $reply_text,
            $method_sig[0],
            $method_sig[1]
        );

        try {
            $this->send_method_frame(array($class_id, $method_id), $args);
        } catch (\Exception $e) {
            $this->do_close();

            throw $e;
        }

        return $this->wait(array(
            $this->waitHelper->get_wait('channel.close_ok')
        ), false, $this->channel_rpc_timeout );
    }
public function close($reply_code = 0, $reply_text = '', $method_sig = array(0, 0))
    {
        $this->callbacks = array();
        if ($this->is_open === false || $this->connection === null) {
            $this->do_close();

            return null; // already closed
        }
        list($class_id, $method_id, $args) = $this->protocolWriter->channelClose(
            $reply_code,
            $reply_text,
            $method_sig[0],
            $method_sig[1]
        );

        try {
            $this->send_method_frame(array($class_id, $method_id), $args);
        } catch (\Exception $e) {
            $this->do_close();

            throw $e;
        }

        return $this->wait(array(
            $this->waitHelper->get_wait('channel.close_ok')
        ), false, $this->channel_rpc_timeout );
    }
public function close ( $ reply_code = 0 , $ reply_text = '' , $ method_sig = array ( 0 , 0 ) ) { $ this -> callbacks = array ( ) ; if ( $ this -> is_open === false || $ this -> connection === null ) { $ this -> do_close ( ) ; return null ; // already closed } list ( $ class_id , $ method_id , $ args ) = $ this -> protocolWriter -> channelClose ( $ reply_code , $ reply_text , $ method_sig [ 0 ] , $ method_sig [ 1 ] ) ; try { $ this -> send_method_frame ( array ( $ class_id , $ method_id ) , $ args ) ; } catch ( \ Exception $ e ) { $ this -> do_close ( ) ; throw $ e ; } return $ this -> wait ( array ( $ this -> waitHelper -> get_wait ( 'channel.close_ok' ) ) , false , $ this -> channel_rpc_timeout ) ; }
Request a channel close

@param int $reply_code
@param string $reply_text
@param array $method_sig
@throws \PhpAmqpLib\Exception\AMQPTimeoutException if the specified operation timeout was exceeded
@return mixed
Request a channel close