| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class BasicCancelOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $consumerTag; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $consumerTag |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $consumerTag) |
|
| 28 | { |
|
| 29 | $this->consumerTag = $consumerTag; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * ConsumerTag. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getConsumerTag() |
|
| 40 | { |
|
| 41 | return $this->consumerTag; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x3C\x00\x1F". |
|
| 50 | Value\ShortStringValue::encode($this->consumerTag); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class BasicConsumeOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $consumerTag; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $consumerTag |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $consumerTag) |
|
| 28 | { |
|
| 29 | $this->consumerTag = $consumerTag; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * ConsumerTag. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getConsumerTag() |
|
| 40 | { |
|
| 41 | return $this->consumerTag; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x3C\x00\x15". |
|
| 50 | Value\ShortStringValue::encode($this->consumerTag); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class BasicGetEmpty extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $reserved1; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $reserved1 |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $reserved1) |
|
| 28 | { |
|
| 29 | $this->reserved1 = $reserved1; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Reserved1. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getReserved1() |
|
| 40 | { |
|
| 41 | return $this->reserved1; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x3C\x00\x48". |
|
| 50 | Value\ShortStringValue::encode($this->reserved1); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class BasicRecover extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var bool |
|
| 20 | */ |
|
| 21 | private $requeue; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param bool $requeue |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $requeue) |
|
| 28 | { |
|
| 29 | $this->requeue = $requeue; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Requeue the message. |
|
| 36 | * |
|
| 37 | * @return bool |
|
| 38 | */ |
|
| 39 | public function isRequeue() |
|
| 40 | { |
|
| 41 | return $this->requeue; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x3C\x00\x6E". |
|
| 50 | Value\BooleanValue::encode($this->requeue); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class BasicRecoverAsync extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var bool |
|
| 20 | */ |
|
| 21 | private $requeue; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param bool $requeue |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $requeue) |
|
| 28 | { |
|
| 29 | $this->requeue = $requeue; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Requeue the message. |
|
| 36 | * |
|
| 37 | * @return bool |
|
| 38 | */ |
|
| 39 | public function isRequeue() |
|
| 40 | { |
|
| 41 | return $this->requeue; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x3C\x00\x64". |
|
| 50 | Value\BooleanValue::encode($this->requeue); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class ChannelFlow extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var bool |
|
| 20 | */ |
|
| 21 | private $active; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param bool $active |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $active) |
|
| 28 | { |
|
| 29 | $this->active = $active; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Start/stop content frames. |
|
| 36 | * |
|
| 37 | * @return bool |
|
| 38 | */ |
|
| 39 | public function isActive() |
|
| 40 | { |
|
| 41 | return $this->active; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x14\x00\x14". |
|
| 50 | Value\BooleanValue::encode($this->active); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class ChannelFlowOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var bool |
|
| 20 | */ |
|
| 21 | private $active; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param bool $active |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $active) |
|
| 28 | { |
|
| 29 | $this->active = $active; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Current flow setting. |
|
| 36 | * |
|
| 37 | * @return bool |
|
| 38 | */ |
|
| 39 | public function isActive() |
|
| 40 | { |
|
| 41 | return $this->active; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x14\x00\x15". |
|
| 50 | Value\BooleanValue::encode($this->active); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class ChannelOpen extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $reserved1; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $reserved1 |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $reserved1) |
|
| 28 | { |
|
| 29 | $this->reserved1 = $reserved1; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Reserved1. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getReserved1() |
|
| 40 | { |
|
| 41 | return $this->reserved1; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x14\x00\x0A". |
|
| 50 | Value\ShortStringValue::encode($this->reserved1); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class ChannelOpenOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $reserved1; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $reserved1 |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $reserved1) |
|
| 28 | { |
|
| 29 | $this->reserved1 = $reserved1; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Reserved1. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getReserved1() |
|
| 40 | { |
|
| 41 | return $this->reserved1; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x14\x00\x0B". |
|
| 50 | Value\LongStringValue::encode($this->reserved1); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 14-52 (lines=39) @@ | ||
| 11 | /** |
|
| 12 | * @codeCoverageIgnore |
|
| 13 | */ |
|
| 14 | class ConfirmSelect extends Frame |
|
| 15 | { |
|
| 16 | /** |
|
| 17 | * @var bool |
|
| 18 | */ |
|
| 19 | private $nowait; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @param int $channel |
|
| 23 | * @param bool $nowait |
|
| 24 | */ |
|
| 25 | public function __construct($channel, $nowait) |
|
| 26 | { |
|
| 27 | $this->nowait = $nowait; |
|
| 28 | ||
| 29 | parent::__construct($channel); |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Nowait. |
|
| 34 | * |
|
| 35 | * @return bool |
|
| 36 | */ |
|
| 37 | public function isNowait() |
|
| 38 | { |
|
| 39 | return $this->nowait; |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @return string |
|
| 44 | */ |
|
| 45 | public function encode() |
|
| 46 | { |
|
| 47 | $data = "\x00\x55\x00\x0A". |
|
| 48 | Value\BooleanValue::encode($this->nowait); |
|
| 49 | ||
| 50 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 14-52 (lines=39) @@ | ||
| 11 | /** |
|
| 12 | * @codeCoverageIgnore |
|
| 13 | */ |
|
| 14 | class ConnectionBlocked extends Frame |
|
| 15 | { |
|
| 16 | /** |
|
| 17 | * @var string |
|
| 18 | */ |
|
| 19 | private $reason; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @param int $channel |
|
| 23 | * @param string $reason |
|
| 24 | */ |
|
| 25 | public function __construct($channel, $reason) |
|
| 26 | { |
|
| 27 | $this->reason = $reason; |
|
| 28 | ||
| 29 | parent::__construct($channel); |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Reason. |
|
| 34 | * |
|
| 35 | * @return string |
|
| 36 | */ |
|
| 37 | public function getReason() |
|
| 38 | { |
|
| 39 | return $this->reason; |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @return string |
|
| 44 | */ |
|
| 45 | public function encode() |
|
| 46 | { |
|
| 47 | $data = "\x00\x0A\x00\x3C". |
|
| 48 | Value\ShortStringValue::encode($this->reason); |
|
| 49 | ||
| 50 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class ConnectionOpenOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $reserved1; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $reserved1 |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $reserved1) |
|
| 28 | { |
|
| 29 | $this->reserved1 = $reserved1; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Reserved1. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getReserved1() |
|
| 40 | { |
|
| 41 | return $this->reserved1; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x0A\x00\x29". |
|
| 50 | Value\ShortStringValue::encode($this->reserved1); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class ConnectionSecure extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $challenge; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $challenge |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $challenge) |
|
| 28 | { |
|
| 29 | $this->challenge = $challenge; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Security challenge data. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getChallenge() |
|
| 40 | { |
|
| 41 | return $this->challenge; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x0A\x00\x14". |
|
| 50 | Value\LongStringValue::encode($this->challenge); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class ConnectionSecureOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | private $response; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param string $response |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $response) |
|
| 28 | { |
|
| 29 | $this->response = $response; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Security response data. |
|
| 36 | * |
|
| 37 | * @return string |
|
| 38 | */ |
|
| 39 | public function getResponse() |
|
| 40 | { |
|
| 41 | return $this->response; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x0A\x00\x15". |
|
| 50 | Value\LongStringValue::encode($this->response); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class QueueDeleteOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var int |
|
| 20 | */ |
|
| 21 | private $messageCount; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param int $messageCount |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $messageCount) |
|
| 28 | { |
|
| 29 | $this->messageCount = $messageCount; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * MessageCount. |
|
| 36 | * |
|
| 37 | * @return int |
|
| 38 | */ |
|
| 39 | public function getMessageCount() |
|
| 40 | { |
|
| 41 | return $this->messageCount; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x32\x00\x29". |
|
| 50 | Value\LongValue::encode($this->messageCount); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 16-54 (lines=39) @@ | ||
| 13 | * |
|
| 14 | * @codeCoverageIgnore |
|
| 15 | */ |
|
| 16 | class QueuePurgeOk extends Frame |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * @var int |
|
| 20 | */ |
|
| 21 | private $messageCount; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param int $channel |
|
| 25 | * @param int $messageCount |
|
| 26 | */ |
|
| 27 | public function __construct($channel, $messageCount) |
|
| 28 | { |
|
| 29 | $this->messageCount = $messageCount; |
|
| 30 | ||
| 31 | parent::__construct($channel); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * MessageCount. |
|
| 36 | * |
|
| 37 | * @return int |
|
| 38 | */ |
|
| 39 | public function getMessageCount() |
|
| 40 | { |
|
| 41 | return $this->messageCount; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function encode() |
|
| 48 | { |
|
| 49 | $data = "\x00\x32\x00\x1F". |
|
| 50 | Value\LongValue::encode($this->messageCount); |
|
| 51 | ||
| 52 | return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE"; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||