Debian Codegraph @

codelitephp/resources/cc/SimpleXML.php

raw
1 <?php
2
3 // Start of SimpleXML v.0.1
4
5 class SimpleXMLElement implements Traversable {
6
7 /**
8 * Creates a new SimpleXMLElement object
9 * @link http://www.php.net/manual/en/simplexmlelement.construct.php
10 * @param data
11 * @param options[optional]
12 * @param data_is_url[optional]
13 * @param ns[optional]
14 * @param is_prefix[optional]
15 */
16 final public function __construct ($data, $options, $data_is_url, $ns, $is_prefix) {}
17
18 /**
19 * Return a well-formed XML string based on SimpleXML element
20 * @link http://www.php.net/manual/en/simplexmlelement.asxml.php
21 * @param filename string[optional] <p>
22 * If specified, the function writes the data to the file rather than
23 * returning it.
24 * </p>
25 * @return mixed If the filename isn't specified, this function
26 * returns a string on success and false on error. If the
27 * parameter is specified, it returns true if the file was written
28 * successfully and false otherwise.
29 */
30 public function asXML ($filename = null) {}
31
32 /**
33 * &Alias; <methodname>SimpleXMLElement::asXML</methodname>
34 * @link http://www.php.net/manual/en/simplexmlelement.savexml.php
35 * @param filename[optional]
36 */
37 public function saveXML ($filename) {}
38
39 /**
40 * Runs XPath query on XML data
41 * @link http://www.php.net/manual/en/simplexmlelement.xpath.php
42 * @param path string <p>
43 * An XPath path
44 * </p>
45 * @return array an array of SimpleXMLElement objects or false in
46 * case of an error.
47 */
48 public function xpath ($path) {}
49
50 /**
51 * Creates a prefix/ns context for the next XPath query
52 * @link http://www.php.net/manual/en/simplexmlelement.registerxpathnamespace.php
53 * @param prefix string <p>
54 * The namespace prefix to use in the XPath query for the namespace given in
55 * ns.
56 * </p>
57 * @param ns string <p>
58 * The namespace to use for the XPath query. This must match a namespace in
59 * use by the XML document or the XPath query using
60 * prefix will not return any results.
61 * </p>
62 * @return bool Returns true on success, false on failure.
63 */
64 public function registerXPathNamespace ($prefix, $ns) {}
65
66 /**
67 * Identifies an element's attributes
68 * @link http://www.php.net/manual/en/simplexmlelement.attributes.php
69 * @param ns string[optional] <p>
70 * An optional namespace for the retrieved attributes
71 * </p>
72 * @param is_prefix bool[optional] <p>
73 * Default to false
74 * </p>
75 * @return SimpleXMLElement a SimpleXMLElement object that can be
76 * iterated over to loop through the attributes on the tag.
77 * </p>
78 * <p>
79 * Returns &null; if called on a SimpleXMLElement
80 * object that already represents an attribute and not a tag.
81 */
82 public function attributes ($ns = null, $is_prefix = null) {}
83
84 /**
85 * Finds children of given node
86 * @link http://www.php.net/manual/en/simplexmlelement.children.php
87 * @param ns string[optional] <p>
88 * An XML namespace.
89 * </p>
90 * @param is_prefix bool[optional] <p>
91 * If is_prefix is true,
92 * ns will be regarded as a prefix. If false,
93 * ns will be regarded as a namespace
94 * URL.
95 * </p>
96 * @return SimpleXMLElement a SimpleXMLElement element, whether the node
97 * has children or not.
98 */
99 public function children ($ns = null, $is_prefix = null) {}
100
101 /**
102 * Returns namespaces used in document
103 * @link http://www.php.net/manual/en/simplexmlelement.getnamespaces.php
104 * @param recursive bool[optional] <p>
105 * If specified, returns all namespaces used in parent and child nodes.
106 * Otherwise, returns only namespaces used in root node.
107 * </p>
108 * @return array The getNamespaces method returns an array of
109 * namespace names with their associated URIs.
110 */
111 public function getNamespaces ($recursive = null) {}
112
113 /**
114 * Returns namespaces declared in document
115 * @link http://www.php.net/manual/en/simplexmlelement.getdocnamespaces.php
116 * @param recursive bool[optional] <p>
117 * If specified, returns all namespaces declared in parent and child nodes.
118 * Otherwise, returns only namespaces declared in root node.
119 * </p>
120 * @param from_root bool[optional] <p>
121 * Allows you to recursively check namespaces under a child node instead of
122 * from the root of the XML doc.
123 * </p>
124 * @return array The getDocNamespaces method returns an array
125 * of namespace names with their associated URIs.
126 */
127 public function getDocNamespaces ($recursive = null, $from_root = null) {}
128
129 /**
130 * Gets the name of the XML element
131 * @link http://www.php.net/manual/en/simplexmlelement.getname.php
132 * @return string The getName method returns as a string the
133 * name of the XML tag referenced by the SimpleXMLElement object.
134 */
135 public function getName () {}
136
137 /**
138 * Adds a child element to the XML node
139 * @link http://www.php.net/manual/en/simplexmlelement.addchild.php
140 * @param name string <p>
141 * The name of the child element to add.
142 * </p>
143 * @param value string[optional] <p>
144 * If specified, the value of the child element.
145 * </p>
146 * @param namespace string[optional] <p>
147 * If specified, the namespace to which the child element belongs.
148 * </p>
149 * @return SimpleXMLElement The addChild method returns a SimpleXMLElement
150 * object representing the child added to the XML node.
151 */
152 public function addChild ($name, $value = null, $namespace = null) {}
153
154 /**
155 * Adds an attribute to the SimpleXML element
156 * @link http://www.php.net/manual/en/simplexmlelement.addattribute.php
157 * @param name string <p>
158 * The name of the attribute to add.
159 * </p>
160 * @param value string[optional] <p>
161 * The value of the attribute.
162 * </p>
163 * @param namespace string[optional] <p>
164 * If specified, the namespace to which the attribute belongs.
165 * </p>
166 * @return void
167 */
168 public function addAttribute ($name, $value = null, $namespace = null) {}
169
170 /**
171 * Returns the string content
172 * @link http://www.php.net/manual/en/simplexmlelement.tostring.php
173 * @return string the string content on success or an empty string on failure.
174 */
175 public function __toString () {}
176
177 /**
178 * Counts the children of an element
179 * @link http://www.php.net/manual/en/simplexmlelement.count.php
180 * @return int the number of elements of an element.
181 */
182 public function count () {}
183
184 }
185
186 class SimpleXMLIterator extends SimpleXMLElement implements Traversable, RecursiveIterator, Iterator, Countable {
187
188 /**
189 * Rewind to the first element
190 * @link http://www.php.net/manual/en/simplexmliterator.rewind.php
191 * @return void
192 */
193 public function rewind () {}
194
195 /**
196 * Check whether the current element is valid
197 * @link http://www.php.net/manual/en/simplexmliterator.valid.php
198 * @return bool true if the current element is valid, otherwise false
199 */
200 public function valid () {}
201
202 /**
203 * Returns the current element
204 * @link http://www.php.net/manual/en/simplexmliterator.current.php
205 * @return mixed the current element as a SimpleXMLIterator object or &null; on failure.
206 */
207 public function current () {}
208
209 /**
210 * Return current key
211 * @link http://www.php.net/manual/en/simplexmliterator.key.php
212 * @return mixed the XML tag name of the element referenced by the current SimpleXMLIterator object or false
213 */
214 public function key () {}
215
216 /**
217 * Move to next element
218 * @link http://www.php.net/manual/en/simplexmliterator.next.php
219 * @return void
220 */
221 public function next () {}
222
223 /**
224 * Checks whether the current element has sub elements.
225 * @link http://www.php.net/manual/en/simplexmliterator.haschildren.php
226 * @return bool true if the current element has sub-elements, otherwise false
227 */
228 public function hasChildren () {}
229
230 /**
231 * Returns the sub-elements of the current element
232 * @link http://www.php.net/manual/en/simplexmliterator.getchildren.php
233 * @return SimpleXMLIterator a SimpleXMLIterator object containing
234 * the sub-elements of the current element.
235 */
236 public function getChildren () {}
237
238 /**
239 * Creates a new SimpleXMLElement object
240 * @link http://www.php.net/manual/en/simplexmlelement.construct.php
241 * @param data
242 * @param options[optional]
243 * @param data_is_url[optional]
244 * @param ns[optional]
245 * @param is_prefix[optional]
246 */
247 final public function __construct ($data, $options, $data_is_url, $ns, $is_prefix) {}
248
249 /**
250 * Return a well-formed XML string based on SimpleXML element
251 * @link http://www.php.net/manual/en/simplexmlelement.asxml.php
252 * @param filename string[optional] <p>
253 * If specified, the function writes the data to the file rather than
254 * returning it.
255 * </p>
256 * @return mixed If the filename isn't specified, this function
257 * returns a string on success and false on error. If the
258 * parameter is specified, it returns true if the file was written
259 * successfully and false otherwise.
260 */
261 public function asXML ($filename = null) {}
262
263 /**
264 * &Alias; <methodname>SimpleXMLElement::asXML</methodname>
265 * @link http://www.php.net/manual/en/simplexmlelement.savexml.php
266 * @param filename[optional]
267 */
268 public function saveXML ($filename) {}
269
270 /**
271 * Runs XPath query on XML data
272 * @link http://www.php.net/manual/en/simplexmlelement.xpath.php
273 * @param path string <p>
274 * An XPath path
275 * </p>
276 * @return array an array of SimpleXMLElement objects or false in
277 * case of an error.
278 */
279 public function xpath ($path) {}
280
281 /**
282 * Creates a prefix/ns context for the next XPath query
283 * @link http://www.php.net/manual/en/simplexmlelement.registerxpathnamespace.php
284 * @param prefix string <p>
285 * The namespace prefix to use in the XPath query for the namespace given in
286 * ns.
287 * </p>
288 * @param ns string <p>
289 * The namespace to use for the XPath query. This must match a namespace in
290 * use by the XML document or the XPath query using
291 * prefix will not return any results.
292 * </p>
293 * @return bool Returns true on success, false on failure.
294 */
295 public function registerXPathNamespace ($prefix, $ns) {}
296
297 /**
298 * Identifies an element's attributes
299 * @link http://www.php.net/manual/en/simplexmlelement.attributes.php
300 * @param ns string[optional] <p>
301 * An optional namespace for the retrieved attributes
302 * </p>
303 * @param is_prefix bool[optional] <p>
304 * Default to false
305 * </p>
306 * @return SimpleXMLElement a SimpleXMLElement object that can be
307 * iterated over to loop through the attributes on the tag.
308 * </p>
309 * <p>
310 * Returns &null; if called on a SimpleXMLElement
311 * object that already represents an attribute and not a tag.
312 */
313 public function attributes ($ns = null, $is_prefix = null) {}
314
315 /**
316 * Finds children of given node
317 * @link http://www.php.net/manual/en/simplexmlelement.children.php
318 * @param ns string[optional] <p>
319 * An XML namespace.
320 * </p>
321 * @param is_prefix bool[optional] <p>
322 * If is_prefix is true,
323 * ns will be regarded as a prefix. If false,
324 * ns will be regarded as a namespace
325 * URL.
326 * </p>
327 * @return SimpleXMLElement a SimpleXMLElement element, whether the node
328 * has children or not.
329 */
330 public function children ($ns = null, $is_prefix = null) {}
331
332 /**
333 * Returns namespaces used in document
334 * @link http://www.php.net/manual/en/simplexmlelement.getnamespaces.php
335 * @param recursive bool[optional] <p>
336 * If specified, returns all namespaces used in parent and child nodes.
337 * Otherwise, returns only namespaces used in root node.
338 * </p>
339 * @return array The getNamespaces method returns an array of
340 * namespace names with their associated URIs.
341 */
342 public function getNamespaces ($recursive = null) {}
343
344 /**
345 * Returns namespaces declared in document
346 * @link http://www.php.net/manual/en/simplexmlelement.getdocnamespaces.php
347 * @param recursive bool[optional] <p>
348 * If specified, returns all namespaces declared in parent and child nodes.
349 * Otherwise, returns only namespaces declared in root node.
350 * </p>
351 * @param from_root bool[optional] <p>
352 * Allows you to recursively check namespaces under a child node instead of
353 * from the root of the XML doc.
354 * </p>
355 * @return array The getDocNamespaces method returns an array
356 * of namespace names with their associated URIs.
357 */
358 public function getDocNamespaces ($recursive = null, $from_root = null) {}
359
360 /**
361 * Gets the name of the XML element
362 * @link http://www.php.net/manual/en/simplexmlelement.getname.php
363 * @return string The getName method returns as a string the
364 * name of the XML tag referenced by the SimpleXMLElement object.
365 */
366 public function getName () {}
367
368 /**
369 * Adds a child element to the XML node
370 * @link http://www.php.net/manual/en/simplexmlelement.addchild.php
371 * @param name string <p>
372 * The name of the child element to add.
373 * </p>
374 * @param value string[optional] <p>
375 * If specified, the value of the child element.
376 * </p>
377 * @param namespace string[optional] <p>
378 * If specified, the namespace to which the child element belongs.
379 * </p>
380 * @return SimpleXMLElement The addChild method returns a SimpleXMLElement
381 * object representing the child added to the XML node.
382 */
383 public function addChild ($name, $value = null, $namespace = null) {}
384
385 /**
386 * Adds an attribute to the SimpleXML element
387 * @link http://www.php.net/manual/en/simplexmlelement.addattribute.php
388 * @param name string <p>
389 * The name of the attribute to add.
390 * </p>
391 * @param value string[optional] <p>
392 * The value of the attribute.
393 * </p>
394 * @param namespace string[optional] <p>
395 * If specified, the namespace to which the attribute belongs.
396 * </p>
397 * @return void
398 */
399 public function addAttribute ($name, $value = null, $namespace = null) {}
400
401 /**
402 * Returns the string content
403 * @link http://www.php.net/manual/en/simplexmlelement.tostring.php
404 * @return string the string content on success or an empty string on failure.
405 */
406 public function __toString () {}
407
408 /**
409 * Counts the children of an element
410 * @link http://www.php.net/manual/en/simplexmlelement.count.php
411 * @return int the number of elements of an element.
412 */
413 public function count () {}
414
415 }
416
417 /**
418 * Interprets an XML file into an object
419 * @link http://www.php.net/manual/en/function.simplexml-load-file.php
420 * @param filename string <p>
421 * Path to the XML file
422 * </p>
423 *
424 * <p>
425 * Libxml 2 unescapes the URI, so if you want to pass e.g.
426 * b&c as the URI parameter a,
427 * you have to call
428 * simplexml_load_file(rawurlencode('http://example.com/?a=' .
429 * urlencode('b&c'))). Since PHP 5.1.0 you don't need to do
430 * this because PHP will do it for you.
431 * </p>
432 * @param class_name string[optional] <p>
433 * You may use this optional parameter so that
434 * simplexml_load_file will return an object of
435 * the specified class. That class should extend the
436 * SimpleXMLElement class.
437 * </p>
438 * @param options int[optional] <p>
439 * Since PHP 5.1.0 and Libxml 2.6.0, you may also use the
440 * options parameter to specify additional Libxml parameters.
441 * </p>
442 * @param ns string[optional] <p>
443 * Namespace prefix or URI.
444 * </p>
445 * @param is_prefix bool[optional] <p>
446 * true if ns is a prefix, false if it's a URI;
447 * defaults to false.
448 * </p>
449 * @return SimpleXMLElement an object of class SimpleXMLElement with
450 * properties containing the data held within the XML document,&return.falseforfailure;.
451 */
452 function simplexml_load_file ($filename, $class_name = null, $options = null, $ns = null, $is_prefix = null) {}
453
454 /**
455 * Interprets a string of XML into an object
456 * @link http://www.php.net/manual/en/function.simplexml-load-string.php
457 * @param data string <p>
458 * A well-formed XML string
459 * </p>
460 * @param class_name string[optional] <p>
461 * You may use this optional parameter so that
462 * simplexml_load_string will return an object of
463 * the specified class. That class should extend the
464 * SimpleXMLElement class.
465 * </p>
466 * @param options int[optional] <p>
467 * Since PHP 5.1.0 and Libxml 2.6.0, you may also use the
468 * options parameter to specify additional Libxml parameters.
469 * </p>
470 * @param ns string[optional] <p>
471 * Namespace prefix or URI.
472 * </p>
473 * @param is_prefix bool[optional] <p>
474 * true if ns is a prefix, false if it's a URI;
475 * defaults to false.
476 * </p>
477 * @return SimpleXMLElement an object of class SimpleXMLElement with
478 * properties containing the data held within the xml document,&return.falseforfailure;.
479 */
480 function simplexml_load_string ($data, $class_name = null, $options = null, $ns = null, $is_prefix = null) {}
481
482 /**
483 * Get a <literal>SimpleXMLElement</literal> object from a DOM node.
484 * @link http://www.php.net/manual/en/function.simplexml-import-dom.php
485 * @param node DOMNode <p>
486 * A DOM Element node
487 * </p>
488 * @param class_name string[optional] <p>
489 * You may use this optional parameter so that
490 * simplexml_import_dom will return an object of
491 * the specified class. That class should extend the
492 * SimpleXMLElement class.
493 * </p>
494 * @return SimpleXMLElement a SimpleXMLElement&return.falseforfailure;.
495 */
496 function simplexml_import_dom (DOMNode $node, $class_name = null) {}
497
498 // End of SimpleXML v.0.1
499 ?>