Deletes an exchange

@param string $exchange
@param bool $if_unused
@param bool $nowait
@param int|null $ticket
@throws \PhpAmqpLib\Exception\AMQPTimeoutException if the specified operation timeout was exceeded
@return mixed|null
359570
public function exchange_delete(
        $exchange,
        $if_unused = false,
        $nowait = false,
        $ticket = null
    ) {
        $ticket = $this->getTicket($ticket);
        list($class_id, $method_id, $args) = $this->protocolWriter->exchangeDelete(
            $ticket,
            $exchange,
            $if_unused,
            $nowait
        );

        $this->send_method_frame(array($class_id, $method_id), $args);

        if ($nowait) {
            return null;
        }

        return $this->wait(array(
            $this->waitHelper->get_wait('exchange.delete_ok')
        ), false, $this->channel_rpc_timeout);
    }
338359
public function exchangeDeclare($exchange, $type, $options = array())
    {
        $args = new Writer();
        $args->writeShort($options['ticket'])
            ->writeShortStr($exchange)
            ->writeShortStr($type)
            ->writeBit($options['passive'])
            ->writeBit($options['durable'])
            ->writeBit($options['auto_delete'])
            ->writeBit($options['internal'])
            ->writeBit($options['no_wait'])
            ->writeTable($options['arguments']);
        return $args;
    }
193683
public function close(Ticket $ticket)
    {
        $this->authorize('publicStatus', $ticket);
        $ticket->update([
            'open' => false,
        ]);

        return redirect()->route('laralum_public::tickets.index')->with('success', __('laralum_tickets::general.closed', ['id' => $ticket->id]));
    }
1290638
public function queueBind($queue = '', $exchange, $routingKey = '', $nowait = false, $arguments = [])
    {
        return $this->getClient()->queueBind($this->getChannelId(), $queue, $exchange, $routingKey, $nowait, $arguments);
    }
322151
public function ticket($forceRefresh = false)
    {
        $key = self::TICKET_CACHE_PREFIX.$this->getAccessToken()->getFingerprint();
        $ticket = $this->getCache()->fetch($key);

        if (!$forceRefresh && !empty($ticket)) {
            return $ticket;
        }

        $result = $this->parseJSON('get', [self::API_TICKET]);

        $this->getCache()->save($key, $result['ticket'], $result['expires_in'] - 500);

        return $result['ticket'];
    }
89459
def delete(self, exchange, if_unused=False, nowait=True, ticket=None,
               cb=None):
        '''
        
        '''
        nowait = nowait and self.allow_nowait() and not cb

        args = Writer()
        args.write_short(ticket or self.default_ticket).\
            write_shortstr(exchange).\
            write_bits(if_unused, nowait)
        self.send_frame(MethodFrame(self.channel_id, 40, 20, args))

        if not nowait:
            self._delete_cb.append(cb)
            self.channel.add_synchronous_cb(self._recv_delete_ok)
896150
public static BaseResult clearTicketCheck(String accessToken, TicketCheck ticketCheck) {
        return clearTicketCheck(accessToken, JsonUtil.toJSONString(ticketCheck));
    }
515490
public function destroy(Event $event, EventTicket $eventTicket)
    {
        $event->tickets()->where($eventTicket->getKeyName(), $eventTicket->getKey())->first()->delete();

        return intend([
            'url' => route('adminarea.events.tickets.index', ['event' => $event]),
            'with' => ['warning' => trans('cortex/foundation::messages.resource_deleted', ['resource' => trans('cortex/bookings::common.event_ticket'), 'identifier' => $eventTicket->name])],
        ]);
    }
972999
public function checkTicket($ticket)
    {
        $url = "https://api.weixin.qq.com/scan/scanticket/check?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['ticket' => $ticket]);
    }
1238303
public function getShakeInfo($ticket,$need_poi=1){
        $params=array(
            "ticket"=>$ticket,
            "need_poi"=>$need_poi
        );
        $rst = $this->_request->post($this->_url . 'getshakeinfo', $params);
        return $this->_client->rst($rst);
    }
593786
public function queueDelete($options)
    {
        $args = new Writer();
        $args->writeShort($options['ticket'])
            ->writeShortStr($options['queue'])
            ->writeBit($options['if_unused'])
            ->writeBit($options['if_empty'])
            ->writeBit($options['no_wait']);
        return $args;
    }
50605
public function cancel($consumerTag, $nowait = false)
    {
        return $this->getClient()->cancel($this->getChannelId(), $consumerTag, $nowait);
    }
575651
function getSubmissionId($submissionTicket) {
		$submission = $this->getSubmission($submissionTicket);
		if (isset($submission)) {
			return $submission->submissionId;
		} else {
			throw new Exception("Invalid submission ticket");
		}
	}
1256690
def unbind(self, exchange, source, routing_key='', nowait=True,
               arguments={}, ticket=None, cb=None):
        '''
        
        '''
        nowait = nowait and self.allow_nowait() and not cb

        args = Writer()
        args.write_short(ticket or self.default_ticket).\
            write_shortstr(exchange).\
            write_shortstr(source).\
            write_shortstr(routing_key).\
            write_bit(nowait).\
            write_table(arguments or {})
        self.send_frame(MethodFrame(self.channel_id, 40, 40, args))

        if not nowait:
            self._unbind_cb.append(cb)
            self.channel.add_synchronous_cb(self._recv_unbind_ok)
94242
public function exchangeDelete($exchange, $options=array())
    {
        $default = array('if_unused' => false, 'no_wait' => false, 'ticket' => null);
        $options = array_merge($default, $options);
        $options['ticket'] = $this->getTicket($options['ticket']);
        $args = $this->frameBuilder->exchangeDelete($exchange, $options);
        $this->sendMethodFrame(array(40, 20), $args);

        if (!$options['no_wait']) {
            return $this->wait(
                array(
                     "40,21" //Channel.exchangeDeleteOk
                )
            );
        }
        return null;
    }
280880
public function queueDelete($queue = '', $ifUnused = false, $ifEmpty = false, $nowait = false)
    {
        return $this->getClient()->queueDelete($this->getChannelId(), $queue, $ifUnused, $ifEmpty, $nowait);
    }
1300409
@DeleteOperation
    public Map<String, Object> destroySsoSession(@Selector final String ticketGrantingTicket) {

        val sessionsMap = new HashMap<String, Object>(1);
        try {
            this.centralAuthenticationService.destroyTicketGrantingTicket(ticketGrantingTicket);
            sessionsMap.put(STATUS, HttpServletResponse.SC_OK);
            sessionsMap.put(TICKET_GRANTING_TICKET, ticketGrantingTicket);
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
            sessionsMap.put(STATUS, HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            sessionsMap.put(TICKET_GRANTING_TICKET, ticketGrantingTicket);
            sessionsMap.put("message", e.getMessage());
        }
        return sessionsMap;
    }