-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathVhostHandler.php
64 lines (55 loc) · 1.55 KB
/
VhostHandler.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
namespace Ola\RabbitMqAdminToolkitBundle;
use Ola\RabbitMqAdminToolkitBundle\Manager\ExchangeManager;
use Ola\RabbitMqAdminToolkitBundle\Manager\PermissionManager;
use Ola\RabbitMqAdminToolkitBundle\Manager\QueueManager;
use Ola\RabbitMqAdminToolkitBundle\Manager\VhostManager;
class VhostHandler
{
/**
* @var VhostManager
*/
private $vhostManager;
/**
* @var PermissionManager
*/
private $permissionManager;
/**
* @var ExchangeManager
*/
private $exchangeManager;
/**
* @var QueueManager
*/
private $queueManager;
public function __construct(
VhostManager $vhostManager,
PermissionManager $permissionManager,
ExchangeManager $exchangeManager,
QueueManager $queueManager
) {
$this->permissionManager = $permissionManager;
$this->vhostManager = $vhostManager;
$this->exchangeManager = $exchangeManager;
$this->queueManager = $queueManager;
}
/**
* @param VhostConfiguration $configuration
*/
public function define(VhostConfiguration $configuration)
{
$this->vhostManager->define($configuration);
$this->permissionManager->define($configuration);
$this->exchangeManager->define($configuration);
$this->queueManager->define($configuration);
}
/**
* @param VhostConfiguration $configuration
*
* @return bool
*/
public function exists(VhostConfiguration $configuration)
{
return $this->vhostManager->exists($configuration);
}
}