| @@ 38-48 (lines=11) @@ | ||
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| 38 | public function getContexts() |
|
| 39 | { |
|
| 40 | $contexts = [Config::CONTEXT_DEFAULT]; |
|
| 41 | if ($this->configurationFile instanceof \SimpleXMLElement) { |
|
| 42 | $configuredContexts = $this->configurationFile->xpath('//s:context'); |
|
| 43 | foreach ($configuredContexts as $context) { |
|
| 44 | $contexts[] = (string)$context['id']; |
|
| 45 | } |
|
| 46 | } |
|
| 47 | return $contexts; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * @param $requestedContext |
|
| @@ 18-26 (lines=9) @@ | ||
| 15 | return $schema; |
|
| 16 | } |
|
| 17 | ||
| 18 | public function getContexts() |
|
| 19 | { |
|
| 20 | $contexts = [Config::CONTEXT_DEFAULT]; |
|
| 21 | $configuredContexts = $this->toXml()->xpath('//s:context'); |
|
| 22 | foreach ($configuredContexts as $context) { |
|
| 23 | $contexts[] = (string)$context['id']; |
|
| 24 | } |
|
| 25 | return $contexts; |
|
| 26 | } |
|
| 27 | } |
|
| 28 | ||