1 | <?php |
||
5 | class AdapterFactory |
||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | protected $adapters = [ |
||
11 | 'amqp' => AMQP\AMQP::class, |
||
12 | 'phpamqplib' => PhpAmqpLib\PhpAmqpLib::class, |
||
13 | ]; |
||
14 | |||
15 | /** |
||
16 | * @param array $options |
||
17 | * @return AdapterInterface |
||
18 | * @throws Exception\InvalidArgumentException |
||
19 | * @throws Exception\OutOfBoundsException |
||
20 | */ |
||
21 | 4 | public function createAdapter(array $options) |
|
41 | |||
42 | /** |
||
43 | * @return array |
||
44 | */ |
||
45 | 3 | public function getAdapters() |
|
49 | |||
50 | /** |
||
51 | * @param array $adapters |
||
52 | * @return $this |
||
53 | */ |
||
54 | 6 | public function setAdapters(array $adapters) |
|
60 | |||
61 | /** |
||
62 | * @param string $name The adapter name |
||
63 | * @param string $adapterClass The adapter class |
||
64 | * @return $this |
||
65 | */ |
||
66 | 1 | public function setAdapter($name, $adapterClass) |
|
73 | } |
||
74 |