1 | <?php |
||
15 | class BaseXmlResponse |
||
16 | { |
||
17 | /** |
||
18 | * @var SimpleXMLElement |
||
19 | */ |
||
20 | protected $node; |
||
21 | |||
22 | /** |
||
23 | * BaseXmlResponse constructor. |
||
24 | */ |
||
25 | 13 | public function __construct() |
|
29 | |||
30 | /** |
||
31 | * @return SimpleXMLElement |
||
32 | */ |
||
33 | 13 | protected function getRootNode() |
|
37 | |||
38 | /** |
||
39 | * @param SimpleXMLElement $xml |
||
40 | * @param string $xpath |
||
41 | */ |
||
42 | 9 | protected function removeByXPath(SimpleXMLElement $xml, $xpath) |
|
50 | |||
51 | /** |
||
52 | * remove the first line of xml string |
||
53 | * @param string $str |
||
54 | * @return string |
||
55 | */ |
||
56 | 1 | protected function removeXmlFirstLine($str) |
|
65 | |||
66 | /** |
||
67 | * @param mixed $value |
||
68 | * @return false|string |
||
69 | */ |
||
70 | 3 | protected function stringify($value) |
|
86 | |||
87 | /** |
||
88 | * @return Response |
||
89 | */ |
||
90 | 1 | public function toResponse() |
|
96 | } |
||
97 |