From 5ce1caaf995f892fe3c2193c1991d278f1bb6f7b Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sat, 21 Nov 2020 14:06:31 +0000 Subject: [PATCH] Generate xml methodsynopses based on stubs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on a patch contributed by Máté Kocsis . git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351469 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/xml/functions/xml-error-string.xml | 13 +++--- .../functions/xml-get-current-byte-index.xml | 22 ++++++++-- .../xml-get-current-column-number.xml | 22 ++++++++-- .../functions/xml-get-current-line-number.xml | 22 ++++++++-- .../xml/functions/xml-get-error-code.xml | 22 ++++++++-- .../xml/functions/xml-parse-into-struct.xml | 24 +++++++++-- reference/xml/functions/xml-parse.xml | 22 ++++++++-- .../xml/functions/xml-parser-create-ns.xml | 42 +++++++++++++++---- reference/xml/functions/xml-parser-create.xml | 40 +++++++++++++++--- reference/xml/functions/xml-parser-free.xml | 27 +++++++++--- .../xml/functions/xml-parser-get-option.xml | 8 ++-- .../xml/functions/xml-parser-set-option.xml | 24 +++++++++-- .../xml-set-character-data-handler.xml | 24 +++++++++-- .../xml/functions/xml-set-default-handler.xml | 24 +++++++++-- .../xml/functions/xml-set-element-handler.xml | 42 +++++++++++++------ .../xml-set-end-namespace-decl-handler.xml | 24 +++++++++-- .../xml-set-external-entity-ref-handler.xml | 8 ++-- .../xml-set-notation-decl-handler.xml | 26 +++++++++--- reference/xml/functions/xml-set-object.xml | 24 +++++++++-- ...xml-set-processing-instruction-handler.xml | 26 +++++++++--- .../xml-set-start-namespace-decl-handler.xml | 24 +++++++++-- .../xml-set-unparsed-entity-decl-handler.xml | 26 +++++++++--- 22 files changed, 430 insertions(+), 106 deletions(-) diff --git a/reference/xml/functions/xml-error-string.xml b/reference/xml/functions/xml-error-string.xml index 7b5ff8356e..4e2d2ae9d4 100644 --- a/reference/xml/functions/xml-error-string.xml +++ b/reference/xml/functions/xml-error-string.xml @@ -1,6 +1,6 @@ - + xml_error_string Get XML parser error string @@ -9,12 +9,12 @@ &reftitle.description; - stringxml_error_string - intcode + stringnullxml_error_string + interror_code Gets the XML parser error string associated with the given - code. + error_code. @@ -23,7 +23,7 @@ - code + error_code An error code from xml_get_error_code. @@ -38,7 +38,7 @@ &reftitle.returnvalues; Returns a string with a textual description of the error - code, or &false; if no description was found. + error_code, or &false; if no description was found. @@ -52,7 +52,6 @@ - - + xml_get_current_byte_index Get current byte index for an XML parser @@ -10,7 +10,7 @@ &reftitle.description; intxml_get_current_byte_index - resourceparser + XmlParserparser Gets the current byte index of the given XML parser. @@ -52,6 +52,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.seealso; @@ -63,7 +80,6 @@ - - + xml_get_current_column_number @@ -12,7 +12,7 @@ &reftitle.description; intxml_get_current_column_number - resourceparser + XmlParserparser Gets the current column number of the given XML parser. @@ -46,6 +46,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.seealso; @@ -57,7 +74,6 @@ - - + xml_get_current_line_number Get current line number for an XML parser @@ -10,7 +10,7 @@ &reftitle.description; intxml_get_current_line_number - resourceparser + XmlParserparser Gets the current line number for the given XML parser. @@ -42,6 +42,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.seealso; @@ -53,7 +70,6 @@ - - + xml_get_error_code Get XML parser error code @@ -10,7 +10,7 @@ &reftitle.description; intxml_get_error_code - resourceparser + XmlParserparser Gets the XML parser error code. @@ -43,6 +43,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.seealso; @@ -53,7 +70,6 @@ - - + xml_parse_into_struct Parse XML data into an array structure @@ -10,10 +10,10 @@ &reftitle.description; intxml_parse_into_struct - resourceparser + XmlParserparser stringdata arrayvalues - arrayindex + arrayindex&null; This function parses an XML string into 2 parallel array structures, one @@ -72,6 +72,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.examples; @@ -282,7 +299,6 @@ Array - - + xml_parse Start parsing an XML document @@ -10,7 +10,7 @@ &reftitle.description; intxml_parse - resourceparser + XmlParserparser stringdata boolis_final&false; @@ -77,6 +77,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.examples; @@ -104,7 +121,6 @@ fclose($stream); - - + xml_parser_create_ns Create an XML parser with namespace support @@ -9,14 +9,14 @@ &reftitle.description; - resourcefalsexml_parser_create_ns - stringencoding + XmlParserxml_parser_create_ns + stringnullencoding&null; stringseparator":" xml_parser_create_ns creates a new XML parser - with XML namespace support and returns a resource handle referencing - it to be used by the other XML functions. + with XML namespace support and returns a XMLParser + instance to be used by the other XML functions. @@ -54,10 +54,39 @@ &reftitle.returnvalues; - Returns a resource handle for the new XML parser, &return.falseforfailure;. + Returns a new XMLParser instance. + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + This function returns an XMLParser instance now; + previously, a resource was returned, &return.falseforfailure;. + + + + 8.0.0 + + encoding is nullable now. + + + + + + + &reftitle.seealso; @@ -69,7 +98,6 @@ - - + xml_parser_create Create an XML parser @@ -9,12 +9,12 @@ &reftitle.description; - resourcefalsexml_parser_create - stringencoding + XmlParserxml_parser_create + stringnullencoding&null; xml_parser_create creates a new XML parser - and returns a resource handle referencing it to be used by the + and returns a XMLParser instance to be used by the other XML functions. @@ -48,10 +48,39 @@ &reftitle.returnvalues; - Returns a resource handle for the new XML parser, &return.falseforfailure;. + Returns a new XMLParser instance. + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + This function returns an XMLParser instance now; + previously, a resource was returned, &return.falseforfailure;. + + + + 8.0.0 + + encoding is nullable now. + + + + + + + &reftitle.seealso; @@ -63,7 +92,6 @@ - - + xml_parser_free Free an XML parser @@ -10,7 +10,7 @@ &reftitle.description; boolxml_parser_free - resourceparser + XmlParserparser Frees the given XML parser. @@ -18,7 +18,7 @@ In addition to calling xml_parser_free when the parsing - is finished, as of PHP 7.0.0 it is necessary to also explicitly unset the + is finished, prior to PHP 8.0.0, it was necessary to also explicitly unset the reference to parser to avoid memory leaks, if the parser resource is referenced from an object, and this object references that parser resource. @@ -45,13 +45,28 @@ &reftitle.returnvalues; - This function returns &false; if parser does not - refer to a valid parser, or else it frees the parser and returns &true;. + &return.success; - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + - + xml_parser_get_option Get options from an XML parser @@ -9,8 +9,8 @@ &reftitle.description; - mixedxml_parser_get_option - resourceparser + stringintxml_parser_get_option + XmlParserparser intoption @@ -66,6 +66,7 @@ + &xml.changelog.parser-param; 7.1.24, 7.2.12, 7.3.0 @@ -79,7 +80,6 @@ - - + xml_parser_set_option Set options in an XML parser @@ -10,9 +10,9 @@ &reftitle.description; boolxml_parser_set_option - resourceparser + XmlParserparser intoption - mixedvalue + stringintvalue Sets an option in an XML parser. @@ -112,8 +112,24 @@ - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + - + xml_set_character_data_handler Set up character data handler @@ -10,7 +10,7 @@ &reftitle.description; boolxml_set_character_data_handler - resourceparser + XmlParserparser callablehandler @@ -44,7 +44,7 @@ two parameters: handler - resourceparser + XmlParserparser stringdata @@ -91,8 +91,24 @@ - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + - + xml_set_default_handler Set up default handler @@ -10,7 +10,7 @@ &reftitle.description; boolxml_set_default_handler - resourceparser + XmlParserparser callablehandler @@ -44,7 +44,7 @@ two parameters: handler - resourceparser + XmlParserparser stringdata @@ -85,6 +85,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.returnvalues; @@ -93,7 +110,6 @@ - - + xml_set_element_handler Set up start and end element handlers @@ -10,14 +10,14 @@ &reftitle.description; boolxml_set_element_handler - resourceparser - callablestart_element_handler - callableend_element_handler + XmlParserparser + callablestart_handler + callableend_handler Sets the element handler functions for the XML parser. - start_element_handler and - end_element_handler are strings containing + start_handler and + end_handler are strings containing the names of functions that must exist when xml_parse is called for parser. @@ -36,14 +36,14 @@ - start_element_handler + start_handler - The function named by start_element_handler + The function named by start_handler must accept three parameters: start_element_handler - resourceparser + XMLParserparser stringname arrayattribs @@ -94,14 +94,14 @@ - end_element_handler + end_handler - The function named by end_element_handler + The function named by end_handler must accept two parameters: end_element_handler - resourceparser + XMLParserparser stringname @@ -144,8 +144,24 @@ - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + - + xml_set_end_namespace_decl_handler Set up end namespace declaration handler @@ -10,7 +10,7 @@ &reftitle.description; boolxml_set_end_namespace_decl_handler - resourceparser + XmlParserparser callablehandler @@ -56,7 +56,7 @@ XML_ERROR_EXTERNAL_ENTITY_HANDLING. handler - resourceparser + XmlParserparser stringprefix @@ -97,6 +97,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.seealso; @@ -107,7 +124,6 @@ - - + xml_set_external_entity_ref_handler Set up external entity reference handler @@ -10,7 +10,7 @@ &reftitle.description; boolxml_set_external_entity_ref_handler - resourceparser + XmlParserparser callablehandler @@ -48,7 +48,7 @@ XML_ERROR_EXTERNAL_ENTITY_HANDLING. handler - resourceparser + XmlParserparser stringopen_entity_names stringbase stringsystem_id @@ -137,6 +137,7 @@ + &xml.changelog.parser-param; 7.3.0 @@ -151,7 +152,6 @@ - - + xml_set_notation_decl_handler Set up notation declaration handler @@ -12,7 +10,7 @@ &reftitle.description; boolxml_set_notation_decl_handler - resourceparser + XmlParserparser callablehandler @@ -58,7 +56,7 @@ five parameters: handler - resourceparser + XmlParserparser stringnotation_name stringbase stringsystem_id @@ -135,8 +133,24 @@ - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + - + xml_set_object Use XML Parser within an object @@ -10,8 +10,8 @@ &reftitle.description; boolxml_set_object - resourceparser - objectobject + XmlParserparser + objectobject This function allows to use parser inside @@ -52,6 +52,23 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.examples; @@ -122,7 +139,6 @@ string(1) "A" - - + xml_set_processing_instruction_handler @@ -12,7 +12,7 @@ &reftitle.description; boolxml_set_processing_instruction_handler - resourceparser + XmlParserparser callablehandler @@ -23,7 +23,7 @@ A processing instruction has the following format: <?target - data?> + data?> You can put PHP code into such a tag, but be aware of one limitation: in @@ -59,7 +59,7 @@ three parameters: handler - resourceparser + XmlParserparser stringtarget stringdata @@ -111,8 +111,24 @@ - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + - + xml_set_start_namespace_decl_handler @@ -12,7 +12,7 @@ &reftitle.description; boolxml_set_start_namespace_decl_handler - resourceparser + XmlParserparser callablehandler @@ -52,7 +52,7 @@ XML_ERROR_EXTERNAL_ENTITY_HANDLING. handler - resourceparser + XmlParserparser stringprefix stringuri @@ -100,6 +100,24 @@ &return.success; + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + + &reftitle.seealso; diff --git a/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml b/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml index e1bf63fca8..245774b3b6 100644 --- a/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml +++ b/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml @@ -1,8 +1,6 @@ - + xml_set_unparsed_entity_decl_handler @@ -14,7 +12,7 @@ &reftitle.description; boolxml_set_unparsed_entity_decl_handler - resourceparser + XmlParserparser callablehandler @@ -64,7 +62,7 @@ parameters: handler - resourceparser + XmlParserparser stringentity_name stringbase stringsystem_id @@ -145,8 +143,24 @@ - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + &xml.changelog.parser-param; + + + + +