@@ 14-49 (lines=36) @@ | ||
11 | * @author Aleksey I. Kuleshov YOU GLOBAL LIMITED |
|
12 | * @package PHPDaemon\Clients\AMQP\Driver\Protocol\v091\Protocol\Basic |
|
13 | */ |
|
14 | class BasicDeliverFrame implements MethodFrame, ContentPrecursorFrame, IncomingFrame |
|
15 | { |
|
16 | const METHOD_ID = 0x003c003c; |
|
17 | ||
18 | public $frameChannelId = 0; |
|
19 | public $consumerTag; // shortstr |
|
20 | public $deliveryTag; // longlong |
|
21 | public $redelivered = false; // bit |
|
22 | public $exchange; // shortstr |
|
23 | public $routingKey; // shortstr |
|
24 | ||
25 | public static function create( |
|
26 | $consumerTag = null, $deliveryTag = null, $redelivered = null, $exchange = null, $routingKey = null |
|
27 | ) |
|
28 | { |
|
29 | $frame = new self(); |
|
30 | ||
31 | if (null !== $consumerTag) { |
|
32 | $frame->consumerTag = $consumerTag; |
|
33 | } |
|
34 | if (null !== $deliveryTag) { |
|
35 | $frame->deliveryTag = $deliveryTag; |
|
36 | } |
|
37 | if (null !== $redelivered) { |
|
38 | $frame->redelivered = $redelivered; |
|
39 | } |
|
40 | if (null !== $exchange) { |
|
41 | $frame->exchange = $exchange; |
|
42 | } |
|
43 | if (null !== $routingKey) { |
|
44 | $frame->routingKey = $routingKey; |
|
45 | } |
|
46 | ||
47 | return $frame; |
|
48 | } |
|
49 | } |
|
50 |
@@ 14-49 (lines=36) @@ | ||
11 | * @author Aleksey I. Kuleshov YOU GLOBAL LIMITED |
|
12 | * @package PHPDaemon\Clients\AMQP\Driver\Protocol\v091\Protocol\Basic |
|
13 | */ |
|
14 | class BasicGetOkFrame implements MethodFrame, ContentPrecursorFrame, IncomingFrame |
|
15 | { |
|
16 | const METHOD_ID = 0x003c0047; |
|
17 | ||
18 | public $frameChannelId = 0; |
|
19 | public $deliveryTag; // longlong |
|
20 | public $redelivered = false; // bit |
|
21 | public $exchange; // shortstr |
|
22 | public $routingKey; // shortstr |
|
23 | public $messageCount; // long |
|
24 | ||
25 | public static function create( |
|
26 | $deliveryTag = null, $redelivered = null, $exchange = null, $routingKey = null, $messageCount = null |
|
27 | ) |
|
28 | { |
|
29 | $frame = new self(); |
|
30 | ||
31 | if (null !== $deliveryTag) { |
|
32 | $frame->deliveryTag = $deliveryTag; |
|
33 | } |
|
34 | if (null !== $redelivered) { |
|
35 | $frame->redelivered = $redelivered; |
|
36 | } |
|
37 | if (null !== $exchange) { |
|
38 | $frame->exchange = $exchange; |
|
39 | } |
|
40 | if (null !== $routingKey) { |
|
41 | $frame->routingKey = $routingKey; |
|
42 | } |
|
43 | if (null !== $messageCount) { |
|
44 | $frame->messageCount = $messageCount; |
|
45 | } |
|
46 | ||
47 | return $frame; |
|
48 | } |
|
49 | } |
|
50 |