| @@ 10-26 (lines=17) @@ | ||
| 7 | use mcorten87\rabbitmq_api\objects\Method; |
|
| 8 | use mcorten87\rabbitmq_api\objects\Url; |
|
| 9 | ||
| 10 | class JobQueueDeleteMapper extends BaseMapper |
|
| 11 | { |
|
| 12 | protected function mapMethod() : Method |
|
| 13 | { |
|
| 14 | return new Method(Method::DELETE); |
|
| 15 | } |
|
| 16 | ||
| 17 | /** |
|
| 18 | * @param JobQueueDelete $job |
|
| 19 | * @return Url |
|
| 20 | */ |
|
| 21 | protected function mapUrl(JobBase $job) : Url |
|
| 22 | { |
|
| 23 | return new Url('queues/' |
|
| 24 | .urlencode((string)$job->getVirtualhost()) |
|
| 25 | .'/'.urlencode((string)$job->getQueueName())); |
|
| 26 | } |
|
| 27 | } |
|
| 28 | ||
| @@ 11-28 (lines=18) @@ | ||
| 8 | use mcorten87\rabbitmq_api\objects\Method; |
|
| 9 | use mcorten87\rabbitmq_api\objects\Url; |
|
| 10 | ||
| 11 | class JobPermissionDeleteMapper extends BaseMapper |
|
| 12 | { |
|
| 13 | ||
| 14 | protected function mapMethod() : Method { |
|
| 15 | return new Method(Method::DELETE); |
|
| 16 | } |
|
| 17 | ||
| 18 | /** |
|
| 19 | * @param JobPermissionDelete $job |
|
| 20 | * @return Url |
|
| 21 | */ |
|
| 22 | protected function mapUrl(JobBase $job) : Url { |
|
| 23 | return new Url('permissions/' |
|
| 24 | .urlencode((string)$job->getVirtualHost()) |
|
| 25 | .'/'.urlencode((string)$job->getUser()) |
|
| 26 | ); |
|
| 27 | } |
|
| 28 | } |
|
| 29 | ||