1 | <?php |
||
8 | abstract class DOMDocument |
||
9 | { |
||
10 | /** |
||
11 | * Coverts the given array to a \DOMDocument. |
||
12 | * |
||
13 | * @param array $array The array to covert. |
||
14 | * |
||
15 | * @return \DOMDocument |
||
16 | */ |
||
17 | final public static function fromArray(array $array) |
||
26 | |||
27 | /** |
||
28 | * Converts the given \DOMDocument to an array. |
||
29 | * |
||
30 | * @param \DOMDocument $document The document to convert. |
||
31 | * |
||
32 | * @return array |
||
33 | */ |
||
34 | final public static function toArray(\DOMDocument $document) |
||
44 | |||
45 | /** |
||
46 | * Helper method to add a new \DOMNode to the given document with the given value. |
||
47 | * |
||
48 | * @param \DOMDocument $document The document to which the node will be added. |
||
49 | * @param string $xpath A valid xpath destination of the new node. |
||
50 | * @param mixed $value The value for the new node. |
||
51 | * |
||
52 | * @return void |
||
53 | * |
||
54 | * @throws \DOMException Thrown if the given $xpath is not valid. |
||
55 | */ |
||
56 | final public static function addXPath(\DOMDocument $document, $xpath, $value = null) |
||
78 | |||
79 | /** |
||
80 | * Helper method to create element(s) from the given tagName. |
||
81 | * |
||
82 | * @param \DOMXPath $domXPath The DOMXPath object built using the owner document. |
||
83 | * @param \DOMNode $context The node to which the new elements will be added. |
||
84 | * @param string $fragment The tag name of the element. |
||
85 | * |
||
86 | * @return \DOMElement|\DOMAttr The DOMNode that was created. |
||
87 | */ |
||
88 | final private static function parseFragment(\DOMXPath $domXPath, \DOMNode $context, $fragment) |
||
142 | |||
143 | /** |
||
144 | * Helper method to add multiple identical nodes to the given context node. |
||
145 | * |
||
146 | * @param \DOMDocument $document The parent document. |
||
147 | * @param \DOMNode $context The node to which the new elements will be added. |
||
148 | * @param string $tagName The tag name of the element. |
||
149 | * @param integer $limit The number of elements to create. |
||
150 | * |
||
151 | * @return void |
||
152 | */ |
||
153 | final private static function addMultiple(\DOMDocument $document, \DOMNode $context, $tagName, $limit) |
||
159 | |||
160 | /** |
||
161 | * Helper method to create all sub elements in the given array based on the given xpath. |
||
162 | * |
||
163 | * @param array $array The array to which the new elements will be added. |
||
164 | * @param string $path The xpath defining the new elements. |
||
165 | * @param mixed $value The value for the last child element. |
||
166 | * |
||
167 | * @return void |
||
168 | */ |
||
169 | final private static function pathToArray(array &$array, $path, $value = null) |
||
189 | |||
190 | /** |
||
191 | * Helper method to ensure the value at the given $key is an array. |
||
192 | * |
||
193 | * @param array $array The array for which element $key should be checked. |
||
194 | * @param string $key The key for which the value will be made into an array. |
||
195 | * |
||
196 | * @return void |
||
197 | */ |
||
198 | final private static function arrayize(array &$array, $key) |
||
211 | |||
212 | /** |
||
213 | * Helper method to flatten a multi-dimensional array into a single dimensional array whose keys are xpaths. |
||
214 | * |
||
215 | * @param array $array The array to flatten. |
||
216 | * @param string $prefix The prefix to recursively add to the flattened keys. |
||
217 | * |
||
218 | * @return array |
||
219 | */ |
||
220 | final private static function flatten(array $array, $prefix = '') |
||
240 | } |
||
241 |
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.