Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function parse($responseData) |
||
10 | { |
||
11 | $xml = new SimpleXMLElement($responseData); |
||
12 | |||
13 | $error = $xml->xpath('/*/ErrNo'); |
||
14 | |||
15 | if (count($error) > 0) { |
||
16 | $errorDesc = $xml->xpath('/*/ErrDesc'); |
||
17 | |||
18 | throw new ClockworkSmsException( |
||
19 | (string)$errorDesc[0], |
||
20 | (string)$error[0] |
||
21 | ); |
||
22 | } |
||
23 | |||
24 | return $this->parseResponse($xml); |
||
25 | } |
||
26 | |||
29 |