| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function initSetConfigXml(array $parameters) |
||
| 20 | { |
||
| 21 | $parameters = Fluent($parameters); |
||
| 22 | $configXml = new SetConfigXMLParameters($parameters->get('meetingID')); |
||
| 23 | $rawXml = $parameters->xml; |
||
| 24 | if (! $parameters->xml instanceof \SimpleXMLElement) { |
||
| 25 | try { |
||
| 26 | $rawXml = new \SimpleXMLElement($parameters->xml); |
||
| 27 | } catch (\Exception $e) { |
||
| 28 | throw new \Exception('Could not parse payload as XMl'); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | $configXml->setRawXml($rawXml); |
||
| 33 | |||
| 34 | return $configXml; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |