for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is automatically generated.
*/
namespace ButterAMQP\Framing\Method;
use ButterAMQP\Framing\Frame;
use ButterAMQP\Value;
/**
* Reject one or more incoming messages.
*
* @codeCoverageIgnore
class BasicNack extends Frame
{
* @var int
private $deliveryTag;
* @var bool
private $multiple;
private $requeue;
* @param int $channel
* @param int $deliveryTag
* @param bool $multiple
* @param bool $requeue
public function __construct($channel, $deliveryTag, $multiple, $requeue)
$this->deliveryTag = $deliveryTag;
$this->multiple = $multiple;
$this->requeue = $requeue;
parent::__construct($channel);
}
* DeliveryTag.
* @return int
public function getDeliveryTag()
return $this->deliveryTag;
* Reject multiple messages.
* @return bool
public function isMultiple()
return $this->multiple;
* Requeue the message.
public function isRequeue()
return $this->requeue;
* @return string
public function encode()
$data = "\x00\x3C\x00\x78".
Value\LongLongValue::encode($this->deliveryTag).
Value\OctetValue::encode(($this->multiple ? 1 : 0) | (($this->requeue ? 1 : 0) << 1));
return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE";