Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
18 | public function getContexts() |
||
19 | { |
||
20 | $contexts = [Config::CONTEXT_DEFAULT]; |
||
21 | $xml = $this->toXml(); |
||
22 | $xml->registerXPathNamespace('s', 'http://www.magiumlib.com/ConfigurationContext'); |
||
23 | $configuredContexts = $xml->xpath('//s:context'); |
||
24 | foreach ($configuredContexts as $context) { |
||
25 | $contexts[] = (string)$context['id']; |
||
26 | } |
||
27 | return $contexts; |
||
28 | } |
||
29 | } |
||
30 |