| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
| 36 | { |
||
| 37 | $rolloutConfig = $container->get('zf2_rollout_config'); |
||
| 38 | |||
| 39 | if (!isset($rolloutConfig['zend_db_storage']['table_name'])) { |
||
| 40 | throw new \RuntimeException('Missing table_name config when using zend db storage!'); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** @var Adapter $adapter */ |
||
| 44 | $adapter = $container->get('Zend\Db\Adapter\Adapter'); |
||
| 45 | |||
| 46 | return new ZendDbAdapterStorage($adapter, $rolloutConfig['zend_db_storage']['table_name']); |
||
| 47 | } |
||
| 48 | } |