| Conditions | 4 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function getCache(\SimpleXMLElement $element) |
||
| 11 | { |
||
| 12 | $config = [ |
||
| 13 | 'adapter' => (string)$element->adapter, |
||
| 14 | 'options' => [] |
||
| 15 | ]; |
||
| 16 | if (isset($element->options)) { |
||
| 17 | foreach ($element->options->children() as $value) { |
||
| 18 | if ($value instanceof \SimpleXMLElement) { |
||
| 19 | $config['options'][$value->getName()] = (string)$value; |
||
| 20 | } |
||
| 21 | } |
||
| 22 | } |
||
| 23 | $cache = StorageFactory::factory($config); |
||
| 24 | return $cache; |
||
| 25 | } |
||
| 26 | |||
| 28 |