1 | <?php |
||
22 | final class Protocol implements ProtocolInterface |
||
23 | { |
||
24 | private $version; |
||
25 | private $read; |
||
26 | private $connection; |
||
27 | private $channel; |
||
28 | private $exchange; |
||
29 | private $queue; |
||
30 | private $basic; |
||
31 | private $transaction; |
||
32 | |||
33 | 2 | public function __construct() |
|
34 | { |
||
35 | 2 | $this->version = new Version(0, 9, 1); |
|
36 | 2 | $this->read = new Reader; |
|
37 | 2 | $this->connection = new Connection; |
|
38 | 2 | $this->channel = new Channel; |
|
39 | 2 | $this->exchange = new Exchange; |
|
40 | 2 | $this->queue = new Queue; |
|
41 | 2 | $this->basic = new Basic; |
|
42 | 2 | $this->transaction = new Transaction; |
|
43 | 2 | } |
|
44 | |||
45 | 1 | public function version(): Version |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 1 | public function read(Method $method, Str $arguments): StreamInterface |
|
54 | { |
||
55 | 1 | return ($this->read)($method, $arguments); |
|
56 | } |
||
57 | |||
58 | 1 | public function connection(): ConnectionInterface |
|
62 | |||
63 | 1 | public function channel(): ChannelInterface |
|
64 | { |
||
65 | 1 | return $this->channel; |
|
66 | } |
||
67 | |||
68 | 1 | public function exchange(): ExchangeInterface |
|
72 | |||
73 | 1 | public function queue(): QueueInterface |
|
77 | |||
78 | 1 | public function basic(): BasicInterface |
|
82 | |||
83 | 1 | public function transaction(): TransactionInterface |
|
87 | } |
||
88 |