| @@ 25-39 (lines=15) @@ | ||
| 22 | $this->channel = $channel; |
|
| 23 | } |
|
| 24 | ||
| 25 | public function declare(Declaration $command): ExchangeInterface |
|
| 26 | { |
|
| 27 | $this->connection->send( |
|
| 28 | $this->connection->protocol()->exchange()->declare( |
|
| 29 | $this->channel, |
|
| 30 | $command |
|
| 31 | ) |
|
| 32 | ); |
|
| 33 | ||
| 34 | if ($command->shouldWait()) { |
|
| 35 | $this->connection->wait('exchange.declare-ok'); |
|
| 36 | } |
|
| 37 | ||
| 38 | return $this; |
|
| 39 | } |
|
| 40 | ||
| 41 | public function delete(Deletion $command): ExchangeInterface |
|
| 42 | { |
|
| @@ 41-55 (lines=15) @@ | ||
| 38 | return $this; |
|
| 39 | } |
|
| 40 | ||
| 41 | public function delete(Deletion $command): ExchangeInterface |
|
| 42 | { |
|
| 43 | $this->connection->send( |
|
| 44 | $this->connection->protocol()->exchange()->delete( |
|
| 45 | $this->channel, |
|
| 46 | $command |
|
| 47 | ) |
|
| 48 | ); |
|
| 49 | ||
| 50 | if ($command->shouldWait()) { |
|
| 51 | $this->connection->wait('exchange.delete-ok'); |
|
| 52 | } |
|
| 53 | ||
| 54 | return $this; |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||