PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/configuration/org.eclipse.osgi/bundles/322/1/.cp/Resources/language/php5.4/xml.php

https://bitbucket.org/2GAndre/myeclipse4php
PHP | 564 lines | 53 code | 28 blank | 483 comment | 0 complexity | 756f35c5bfa38ea8a6308d8ec648ea3c MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. <?php
  2. // Start of xml v.
  3. /**
  4. * Create an XML parser
  5. * @link http://www.php.net/manual/en/function.xml-parser-create.php
  6. * @param encoding string[optional] <p>
  7. * The optional encoding specifies the character
  8. * encoding for the input/output in PHP 4. Starting from PHP 5, the input
  9. * encoding is automatically detected, so that the
  10. * encoding parameter specifies only the output
  11. * encoding. In PHP 4, the default output encoding is the same as the
  12. * input charset. If empty string is passed, the parser attempts to identify
  13. * which encoding the document is encoded in by looking at the heading 3 or
  14. * 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is
  15. * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
  16. * encodings are ISO-8859-1, UTF-8 and
  17. * US-ASCII.
  18. * </p>
  19. * @return resource a resource handle for the new XML parser.
  20. */
  21. function xml_parser_create ($encoding = null) {}
  22. /**
  23. * Create an XML parser with namespace support
  24. * @link http://www.php.net/manual/en/function.xml-parser-create-ns.php
  25. * @param encoding string[optional] <p>
  26. * The optional encoding specifies the character
  27. * encoding for the input/output in PHP 4. Starting from PHP 5, the input
  28. * encoding is automatically detected, so that the
  29. * encoding parameter specifies only the output
  30. * encoding. In PHP 4, the default output encoding is the same as the
  31. * input charset. In PHP 5.0.0 and 5.0.1, the default output charset is
  32. * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
  33. * encodings are ISO-8859-1, UTF-8 and
  34. * US-ASCII.
  35. * </p>
  36. * @param separator string[optional] <p>
  37. * With a namespace aware parser tag parameters passed to the various
  38. * handler functions will consist of namespace and tag name separated by
  39. * the string specified in seperator.
  40. * </p>
  41. * @return resource a resource handle for the new XML parser.
  42. */
  43. function xml_parser_create_ns ($encoding = null, $separator = null) {}
  44. /**
  45. * Use XML Parser within an object
  46. * @link http://www.php.net/manual/en/function.xml-set-object.php
  47. * @param parser resource <p>
  48. * A reference to the XML parser to use inside the object.
  49. * </p>
  50. * @param object object <p>
  51. * The object where to use the XML parser.
  52. * </p>
  53. * @return bool Returns true on success or false on failure.
  54. */
  55. function xml_set_object ($parser, &$object) {}
  56. /**
  57. * Set up start and end element handlers
  58. * @link http://www.php.net/manual/en/function.xml-set-element-handler.php
  59. * @param parser resource <p>
  60. * A reference to the XML parser to set up start and end element handler functions.
  61. * </p>
  62. * @param start_element_handler callback <p>
  63. * The function named by start_element_handler
  64. * must accept three parameters:
  65. * start_element_handler
  66. * resourceparser
  67. * stringname
  68. * arrayattribs
  69. * parser
  70. * The first parameter, parser, is a
  71. * reference to the XML parser calling the handler.
  72. * @param end_element_handler callback <p>
  73. * The function named by end_element_handler
  74. * must accept two parameters:
  75. * end_element_handler
  76. * resourceparser
  77. * stringname
  78. * parser
  79. * The first parameter, parser, is a
  80. * reference to the XML parser calling the handler.
  81. * @return bool Returns true on success or false on failure.
  82. */
  83. function xml_set_element_handler ($parser, $start_element_handler, $end_element_handler) {}
  84. /**
  85. * Set up character data handler
  86. * @link http://www.php.net/manual/en/function.xml-set-character-data-handler.php
  87. * @param parser resource <p>
  88. * A reference to the XML parser to set up character data handler function.
  89. * </p>
  90. * @param handler callback <p>
  91. * handler is a string containing the name of a
  92. * function that must exist when xml_parse is called
  93. * for parser.
  94. * </p>
  95. * <p>
  96. * The function named by handler must accept
  97. * two parameters:
  98. * handler
  99. * resourceparser
  100. * stringdata
  101. * parser
  102. * The first parameter, parser, is a
  103. * reference to the XML parser calling the handler.
  104. * @return bool Returns true on success or false on failure.
  105. */
  106. function xml_set_character_data_handler ($parser, $handler) {}
  107. /**
  108. * Set up processing instruction (PI) handler
  109. * @link http://www.php.net/manual/en/function.xml-set-processing-instruction-handler.php
  110. * @param parser resource <p>
  111. * A reference to the XML parser to set up processing instruction (PI) handler function.
  112. * </p>
  113. * @param handler callback <p>
  114. * handler is a string containing the name of a
  115. * function that must exist when xml_parse is called
  116. * for parser.
  117. * </p>
  118. * <p>
  119. * The function named by handler must accept
  120. * three parameters:
  121. * handler
  122. * resourceparser
  123. * stringtarget
  124. * stringdata
  125. * parser
  126. * The first parameter, parser, is a
  127. * reference to the XML parser calling the handler.
  128. * @return bool Returns true on success or false on failure.
  129. */
  130. function xml_set_processing_instruction_handler ($parser, $handler) {}
  131. /**
  132. * Set up default handler
  133. * @link http://www.php.net/manual/en/function.xml-set-default-handler.php
  134. * @param parser resource <p>
  135. * A reference to the XML parser to set up default handler function.
  136. * </p>
  137. * @param handler callback <p>
  138. * handler is a string containing the name of a
  139. * function that must exist when xml_parse is called
  140. * for parser.
  141. * </p>
  142. * <p>
  143. * The function named by handler must accept
  144. * two parameters:
  145. * handler
  146. * resourceparser
  147. * stringdata
  148. * parser
  149. * The first parameter, parser, is a
  150. * reference to the XML parser calling the handler.
  151. * @return bool Returns true on success or false on failure.
  152. */
  153. function xml_set_default_handler ($parser, $handler) {}
  154. /**
  155. * Set up unparsed entity declaration handler
  156. * @link http://www.php.net/manual/en/function.xml-set-unparsed-entity-decl-handler.php
  157. * @param parser resource <p>
  158. * A reference to the XML parser to set up unparsed entity declaration handler function.
  159. * </p>
  160. * @param handler callback <p>
  161. * handler is a string containing the name of a
  162. * function that must exist when xml_parse is called
  163. * for parser.
  164. * </p>
  165. * <p>
  166. * The function named by handler must accept six
  167. * parameters:
  168. * handler
  169. * resourceparser
  170. * stringentity_name
  171. * stringbase
  172. * stringsystem_id
  173. * stringpublic_id
  174. * stringnotation_name
  175. * parser
  176. * The first parameter, parser, is a
  177. * reference to the XML parser calling the
  178. * handler.
  179. * @return bool Returns true on success or false on failure.
  180. */
  181. function xml_set_unparsed_entity_decl_handler ($parser, $handler) {}
  182. /**
  183. * Set up notation declaration handler
  184. * @link http://www.php.net/manual/en/function.xml-set-notation-decl-handler.php
  185. * @param parser resource <p>
  186. * A reference to the XML parser to set up notation declaration handler function.
  187. * </p>
  188. * @param handler callback <p>
  189. * handler is a string containing the name of a
  190. * function that must exist when xml_parse is called
  191. * for parser.
  192. * </p>
  193. * <p>
  194. * The function named by handler must accept
  195. * five parameters:
  196. * handler
  197. * resourceparser
  198. * stringnotation_name
  199. * stringbase
  200. * stringsystem_id
  201. * stringpublic_id
  202. * parser
  203. * The first parameter, parser, is a
  204. * reference to the XML parser calling the handler.
  205. * @return bool Returns true on success or false on failure.
  206. */
  207. function xml_set_notation_decl_handler ($parser, $handler) {}
  208. /**
  209. * Set up external entity reference handler
  210. * @link http://www.php.net/manual/en/function.xml-set-external-entity-ref-handler.php
  211. * @param parser resource <p>
  212. * A reference to the XML parser to set up external entity reference handler function.
  213. * </p>
  214. * @param handler callback <p>
  215. * handler is a string containing the name of a
  216. * function that must exist when xml_parse is called
  217. * for parser.
  218. * </p>
  219. * <p>
  220. * The function named by handler must accept
  221. * five parameters, and should return an integer value.If the
  222. * value returned from the handler is false (which it will be if no
  223. * value is returned), the XML parser will stop parsing and
  224. * xml_get_error_code will return
  225. * XML_ERROR_EXTERNAL_ENTITY_HANDLING.
  226. * handler
  227. * resourceparser
  228. * stringopen_entity_names
  229. * stringbase
  230. * stringsystem_id
  231. * stringpublic_id
  232. * parser
  233. * The first parameter, parser, is a
  234. * reference to the XML parser calling the handler.
  235. * @return bool Returns true on success or false on failure.
  236. */
  237. function xml_set_external_entity_ref_handler ($parser, $handler) {}
  238. /**
  239. * Set up start namespace declaration handler
  240. * @link http://www.php.net/manual/en/function.xml-set-start-namespace-decl-handler.php
  241. * @param parser resource <p>
  242. * A reference to the XML parser.
  243. * </p>
  244. * @param handler callback <p>
  245. * handler is a string containing the name of a
  246. * function that must exist when xml_parse is called
  247. * for parser.
  248. * </p>
  249. * <p>
  250. * The function named by handler must accept
  251. * three parameters, and should return an integer value. If the
  252. * value returned from the handler is false (which it will be if no
  253. * value is returned), the XML parser will stop parsing and
  254. * xml_get_error_code will return
  255. * XML_ERROR_EXTERNAL_ENTITY_HANDLING.
  256. * handler
  257. * resourceparser
  258. * stringprefix
  259. * stringuri
  260. * parser
  261. * The first parameter, parser, is a
  262. * reference to the XML parser calling the handler.
  263. * @return bool Returns true on success or false on failure.
  264. */
  265. function xml_set_start_namespace_decl_handler ($parser, $handler) {}
  266. /**
  267. * Set up end namespace declaration handler
  268. * @link http://www.php.net/manual/en/function.xml-set-end-namespace-decl-handler.php
  269. * @param parser resource <p>
  270. * A reference to the XML parser.
  271. * </p>
  272. * @param handler callback <p>
  273. * handler is a string containing the name of a
  274. * function that must exist when xml_parse is called
  275. * for parser.
  276. * </p>
  277. * <p>
  278. * The function named by handler must accept
  279. * two parameters, and should return an integer value. If the
  280. * value returned from the handler is false (which it will be if no
  281. * value is returned), the XML parser will stop parsing and
  282. * xml_get_error_code will return
  283. * XML_ERROR_EXTERNAL_ENTITY_HANDLING.
  284. * handler
  285. * resourceparser
  286. * stringprefix
  287. * parser
  288. * The first parameter, parser, is a
  289. * reference to the XML parser calling the handler.
  290. * @return bool Returns true on success or false on failure.
  291. */
  292. function xml_set_end_namespace_decl_handler ($parser, $handler) {}
  293. /**
  294. * Start parsing an XML document
  295. * @link http://www.php.net/manual/en/function.xml-parse.php
  296. * @param parser resource <p>
  297. * A reference to the XML parser to use.
  298. * </p>
  299. * @param data string <p>
  300. * Chunk of data to parse. A document may be parsed piece-wise by
  301. * calling xml_parse several times with new data,
  302. * as long as the is_final parameter is set and
  303. * true when the last data is parsed.
  304. * </p>
  305. * @param is_final bool[optional] <p>
  306. * If set and true, data is the last piece of
  307. * data sent in this parse.
  308. * </p>
  309. * @return int 1 on success or 0 on failure.
  310. * </p>
  311. * <p>
  312. * For unsuccessful parses, error information can be retrieved with
  313. * xml_get_error_code,
  314. * xml_error_string,
  315. * xml_get_current_line_number,
  316. * xml_get_current_column_number and
  317. * xml_get_current_byte_index.
  318. * </p>
  319. * <p>
  320. * Entity errors are reported at the end of the data thus only if
  321. * is_final is set and true.
  322. */
  323. function xml_parse ($parser, $data, $is_final = null) {}
  324. /**
  325. * Parse XML data into an array structure
  326. * @link http://www.php.net/manual/en/function.xml-parse-into-struct.php
  327. * @param parser resource <p>
  328. * A reference to the XML parser.
  329. * </p>
  330. * @param data string <p>
  331. * A string containing the XML data.
  332. * </p>
  333. * @param values array <p>
  334. * An array containing the values of the XML data
  335. * </p>
  336. * @param index array[optional] <p>
  337. * An array containing pointers to the location of the appropriate values in the $values.
  338. * </p>
  339. * @return int xml_parse_into_struct returns 0 for failure and 1 for
  340. * success. This is not the same as false and true, be careful with
  341. * operators such as ===.
  342. */
  343. function xml_parse_into_struct ($parser, $data, array &$values, array &$index = null) {}
  344. /**
  345. * Get XML parser error code
  346. * @link http://www.php.net/manual/en/function.xml-get-error-code.php
  347. * @param parser resource <p>
  348. * A reference to the XML parser to get error code from.
  349. * </p>
  350. * @return int This function returns false if parser does
  351. * not refer to a valid parser, or else it returns one of the error
  352. * codes listed in the error codes
  353. * section.
  354. */
  355. function xml_get_error_code ($parser) {}
  356. /**
  357. * Get XML parser error string
  358. * @link http://www.php.net/manual/en/function.xml-error-string.php
  359. * @param code int <p>
  360. * An error code from xml_get_error_code.
  361. * </p>
  362. * @return string a string with a textual description of the error
  363. * code, or false if no description was found.
  364. */
  365. function xml_error_string ($code) {}
  366. /**
  367. * Get current line number for an XML parser
  368. * @link http://www.php.net/manual/en/function.xml-get-current-line-number.php
  369. * @param parser resource <p>
  370. * A reference to the XML parser to get line number from.
  371. * </p>
  372. * @return int This function returns false if parser does
  373. * not refer to a valid parser, or else it returns which line the
  374. * parser is currently at in its data buffer.
  375. */
  376. function xml_get_current_line_number ($parser) {}
  377. /**
  378. * Get current column number for an XML parser
  379. * @link http://www.php.net/manual/en/function.xml-get-current-column-number.php
  380. * @param parser resource <p>
  381. * A reference to the XML parser to get column number from.
  382. * </p>
  383. * @return int This function returns false if parser does
  384. * not refer to a valid parser, or else it returns which column on
  385. * the current line (as given by
  386. * xml_get_current_line_number) the parser is
  387. * currently at.
  388. */
  389. function xml_get_current_column_number ($parser) {}
  390. /**
  391. * Get current byte index for an XML parser
  392. * @link http://www.php.net/manual/en/function.xml-get-current-byte-index.php
  393. * @param parser resource <p>
  394. * A reference to the XML parser to get byte index from.
  395. * </p>
  396. * @return int This function returns false if parser does
  397. * not refer to a valid parser, or else it returns which byte index
  398. * the parser is currently at in its data buffer (starting at 0).
  399. */
  400. function xml_get_current_byte_index ($parser) {}
  401. /**
  402. * Free an XML parser
  403. * @link http://www.php.net/manual/en/function.xml-parser-free.php
  404. * @param parser resource A reference to the XML parser to free.
  405. * @return bool This function returns false if parser does not
  406. * refer to a valid parser, or else it frees the parser and returns true.
  407. */
  408. function xml_parser_free ($parser) {}
  409. /**
  410. * Set options in an XML parser
  411. * @link http://www.php.net/manual/en/function.xml-parser-set-option.php
  412. * @param parser resource <p>
  413. * A reference to the XML parser to set an option in.
  414. * </p>
  415. * @param option int <p>
  416. * Which option to set. See below.
  417. * </p>
  418. * <p>
  419. * The following options are available:
  420. * <table>
  421. * XML parser options
  422. * <tr valign="top">
  423. * <td>Option constant</td>
  424. * <td>Data type</td>
  425. * <td>Description</td>
  426. * </tr>
  427. * <tr valign="top">
  428. * <td>XML_OPTION_CASE_FOLDING</td>
  429. * <td>integer</td>
  430. * <td>
  431. * Controls whether case-folding is enabled for this
  432. * XML parser. Enabled by default.
  433. * </td>
  434. * </tr>
  435. * <tr valign="top">
  436. * <td>XML_OPTION_SKIP_TAGSTART</td>
  437. * <td>integer</td>
  438. * <td>
  439. * Specify how many characters should be skipped in the beginning of a
  440. * tag name.
  441. * </td>
  442. * </tr>
  443. * <tr valign="top">
  444. * <td>XML_OPTION_SKIP_WHITE</td>
  445. * <td>integer</td>
  446. * <td>
  447. * Whether to skip values consisting of whitespace characters.
  448. * </td>
  449. * </tr>
  450. * <tr valign="top">
  451. * <td>XML_OPTION_TARGET_ENCODING</td>
  452. * <td>string</td>
  453. * <td>
  454. * Sets which target encoding to
  455. * use in this XML parser.By default, it is set to the same as the
  456. * source encoding used by xml_parser_create.
  457. * Supported target encodings are ISO-8859-1,
  458. * US-ASCII and UTF-8.
  459. * </td>
  460. * </tr>
  461. * </table>
  462. * </p>
  463. * @param value mixed <p>
  464. * The option's new value.
  465. * </p>
  466. * @return bool This function returns false if parser does not
  467. * refer to a valid parser, or if the option could not be set. Else the
  468. * option is set and true is returned.
  469. */
  470. function xml_parser_set_option ($parser, $option, $value) {}
  471. /**
  472. * Get options from an XML parser
  473. * @link http://www.php.net/manual/en/function.xml-parser-get-option.php
  474. * @param parser resource A reference to the XML parser to get an option from.
  475. * @param option int Which option to fetch. XML_OPTION_CASE_FOLDING
  476. * and XML_OPTION_TARGET_ENCODING are available.
  477. * See xml_parser_set_option for their description.
  478. * @return mixed This function returns false if parser does
  479. * not refer to a valid parser or if option isn't
  480. * valid (generates also a E_WARNING).
  481. * Else the option's value is returned.
  482. */
  483. function xml_parser_get_option ($parser, $option) {}
  484. /**
  485. * Encodes an ISO-8859-1 string to UTF-8
  486. * @link http://www.php.net/manual/en/function.utf8-encode.php
  487. * @param data string <p>
  488. * An ISO-8859-1 string.
  489. * </p>
  490. * @return string the UTF-8 translation of data.
  491. */
  492. function utf8_encode ($data) {}
  493. /**
  494. * Converts a string with ISO-8859-1 characters encoded with UTF-8
  495. to single-byte ISO-8859-1
  496. * @link http://www.php.net/manual/en/function.utf8-decode.php
  497. * @param data string <p>
  498. * An UTF-8 encoded string.
  499. * </p>
  500. * @return string the ISO-8859-1 translation of data.
  501. */
  502. function utf8_decode ($data) {}
  503. define ('XML_ERROR_NONE', 0);
  504. define ('XML_ERROR_NO_MEMORY', 1);
  505. define ('XML_ERROR_SYNTAX', 2);
  506. define ('XML_ERROR_NO_ELEMENTS', 3);
  507. define ('XML_ERROR_INVALID_TOKEN', 4);
  508. define ('XML_ERROR_UNCLOSED_TOKEN', 5);
  509. define ('XML_ERROR_PARTIAL_CHAR', 6);
  510. define ('XML_ERROR_TAG_MISMATCH', 7);
  511. define ('XML_ERROR_DUPLICATE_ATTRIBUTE', 8);
  512. define ('XML_ERROR_JUNK_AFTER_DOC_ELEMENT', 9);
  513. define ('XML_ERROR_PARAM_ENTITY_REF', 10);
  514. define ('XML_ERROR_UNDEFINED_ENTITY', 11);
  515. define ('XML_ERROR_RECURSIVE_ENTITY_REF', 12);
  516. define ('XML_ERROR_ASYNC_ENTITY', 13);
  517. define ('XML_ERROR_BAD_CHAR_REF', 14);
  518. define ('XML_ERROR_BINARY_ENTITY_REF', 15);
  519. define ('XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', 16);
  520. define ('XML_ERROR_MISPLACED_XML_PI', 17);
  521. define ('XML_ERROR_UNKNOWN_ENCODING', 18);
  522. define ('XML_ERROR_INCORRECT_ENCODING', 19);
  523. define ('XML_ERROR_UNCLOSED_CDATA_SECTION', 20);
  524. define ('XML_ERROR_EXTERNAL_ENTITY_HANDLING', 21);
  525. define ('XML_OPTION_CASE_FOLDING', 1);
  526. define ('XML_OPTION_TARGET_ENCODING', 2);
  527. define ('XML_OPTION_SKIP_TAGSTART', 3);
  528. define ('XML_OPTION_SKIP_WHITE', 4);
  529. /**
  530. * Holds the SAX implementation method.
  531. * Can be libxml or expat.
  532. * @link http://www.php.net/manual/en/xml.constants.php
  533. */
  534. define ('XML_SAX_IMPL', "libxml");
  535. // End of xml v.
  536. ?>