| Total Complexity | 5 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class StorageManager |
||
| 8 | { |
||
| 9 | protected $adapter; |
||
| 10 | protected $adapterName; |
||
| 11 | |||
| 12 | function __construct($options = []) |
||
| 13 | { |
||
| 14 | if (isset($options['adapter'])) { |
||
| 15 | $this->adapterName = $options['adapter']; |
||
| 16 | $factory = AdapterFactory::instance(); |
||
| 17 | $this->adapter = $factory->getAdapter($options['adapter'], $options); |
||
| 18 | } |
||
| 19 | } |
||
| 20 | |||
| 21 | public function getAdapter() |
||
| 30 | } |
||
| 31 | } |
||
| 35 | } |