1 | <?php |
||
15 | class XML |
||
16 | { |
||
17 | const NAME_ATTRIBUTES = '@attributes'; |
||
18 | |||
19 | const NAME_CONTENT = '@content'; |
||
20 | |||
21 | const NAME_ROOT = '@root'; |
||
22 | |||
23 | /** |
||
24 | * XML to array. |
||
25 | * |
||
26 | * @param string $xml XML string |
||
27 | * @param array $forceArrayKeys |
||
28 | * |
||
29 | * @return array|false |
||
30 | */ |
||
31 | public static function parse($xml, $forceArrayKeys = []) |
||
49 | |||
50 | /** |
||
51 | * 请求 |
||
52 | * @param array $data |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public static function buildRequest(array $data = []) |
||
60 | |||
61 | /** |
||
62 | * 响应 |
||
63 | * @param array $data |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public static function buildResponse(array $data = []) |
||
71 | |||
72 | /** |
||
73 | * XML encode. |
||
74 | * |
||
75 | * @param array $data |
||
76 | * @param string $method |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | public static function build(array $data = [], string $method) |
||
92 | |||
93 | /** |
||
94 | * @param DOMDocument $document |
||
95 | * @param array $rootOptions |
||
96 | * |
||
97 | * @return DOMNode |
||
98 | */ |
||
99 | protected static function buildRoot(DomDocument $document, array $rootOptions = []) |
||
105 | |||
106 | /** |
||
107 | * @param array $data |
||
108 | * @param DOMNode $node |
||
109 | * @param DOMDocument $DOMDocument |
||
110 | */ |
||
111 | protected static function buildNode(array $data, DOMNode &$node, DOMDocument $DOMDocument) |
||
130 | |||
131 | /** |
||
132 | * Convert DOMDocument->documentElement to array |
||
133 | * |
||
134 | * @param DOMElement $documentElement |
||
135 | * @param array $forceArrayKeys |
||
136 | * |
||
137 | * @return array |
||
138 | */ |
||
139 | protected static function DOMDocumentToArray($documentElement, $forceArrayKeys = []) |
||
191 | } |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.