1 | <?php |
||
12 | class ConnectionFactoryFactory |
||
13 | { |
||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $factoryMap = [ |
||
18 | 'lazy' => LazyConnectionFactory::class, |
||
19 | 'stream' => StreamConnectionFactory::class, |
||
20 | 'socket' => SocketConnectionFactory::class, |
||
21 | 'ssl' => SSLConnectionFactory::class, |
||
22 | ]; |
||
23 | |||
24 | protected $instances = []; |
||
25 | |||
26 | /** |
||
27 | * Create the connection factory |
||
28 | * |
||
29 | * @param string $type |
||
30 | * |
||
31 | * @return ConnectionFactoryInterface |
||
32 | * @throws Exception\InvalidArgumentException |
||
33 | * @throws Exception\RuntimeException |
||
34 | */ |
||
35 | 10 | public function createFactory($type) |
|
52 | |||
53 | /** |
||
54 | * @return array |
||
55 | */ |
||
56 | 10 | public function getFactoryMap() |
|
60 | |||
61 | /** |
||
62 | * @param array $factoryMap |
||
63 | * @return $this |
||
64 | */ |
||
65 | 3 | public function setFactoryMap(array $factoryMap) |
|
70 | } |
||
71 |