Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
20 | class OptimusManager extends AbstractManager |
||
21 | { |
||
22 | /** |
||
23 | * The factory instance. |
||
24 | */ |
||
25 | private OptimusFactory $factory; |
||
26 | |||
27 | public function __construct( |
||
28 | Repository $config, |
||
29 | OptimusFactory $factory |
||
30 | ) { |
||
31 | parent::__construct($config); |
||
32 | |||
33 | $this->factory = $factory; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Create the connection instance. |
||
38 | * |
||
39 | * @param array $config |
||
40 | * @return \Jenssegers\Optimus\Optimus |
||
41 | */ |
||
42 | protected function createConnection(array $config): Optimus |
||
43 | { |
||
44 | return $this->factory->make($config); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Get the configuration name. |
||
49 | */ |
||
50 | protected function getConfigName(): string |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Get the factory instance. |
||
57 | */ |
||
58 | public function getFactory(): OptimusFactory |
||
61 | } |
||
62 | } |
||
63 |