Skip to content

Commit

Permalink
Sync xml functions (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Oct 25, 2024
1 parent 087848c commit 4a436ed
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 40 deletions.
3 changes: 1 addition & 2 deletions reference/reflection/book.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 48ce43fe79fa0c9f31f187ea8ec995b4cb13037e Maintainer: daijie Status: ready -->
<!-- EN-Revision: fe42297da7bf4910bde3622896b4ecc0f91817ed Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<book xml:id="book.reflection" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<?phpdoc extension-membership="core" ?>
Expand All @@ -20,7 +20,6 @@
</para>
</preface>

&reference.reflection.constants;
&reference.reflection.examples;
&reference.reflection.extending;
&reference.reflection.reflection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: ec2fe9a592f794978114ef5021db9f1d00c2e05d Maintainer: 谢毅斌 Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: e890e4a7f97a9ea85e60a38443e7c8eb7ae9383f Maintainer: 谢毅斌 Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="reflectionfunctionabstract.isdeprecated" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionFunctionAbstract::isDeprecated</refname>
Expand Down Expand Up @@ -61,6 +61,7 @@ bool(true)
&reftitle.seealso;
<para>
<simplelist>
<member><classname>Deprecated</classname></member>
<member><methodname>ReflectionFunctionAbstract::getDocComment</methodname></member>
</simplelist>
</para>
Expand Down
2 changes: 1 addition & 1 deletion reference/spl/book.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 48ce43fe79fa0c9f31f187ea8ec995b4cb13037e Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: 487afb09014843c0911daf7c7c962c3dd4a2c610 Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: Luffy -->
<book xml:id="book.spl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<?phpdoc extension-membership="core" ?>
Expand Down
70 changes: 41 additions & 29 deletions reference/xml/constants.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 86e6094e86b84a51d00ab217ac50ce8dde33d82a Maintainer: Gregory Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 9acfa18973f304f8f2d531f28dd12b12c2b84f8b Maintainer: Gregory Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<appendix xml:id="xml.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&extension.constants;
<variablelist>
<varlistentry xml:id="constant.xml-error-none">
<term>
<constant>XML_ERROR_NONE</constant>
<constant>XML_ERROR_NONE</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -19,7 +19,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-no-memory">
<term>
<constant>XML_ERROR_NO_MEMORY</constant>
<constant>XML_ERROR_NO_MEMORY</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -30,7 +30,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-syntax">
<term>
<constant>XML_ERROR_SYNTAX</constant>
<constant>XML_ERROR_SYNTAX</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -41,7 +41,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-no-elements">
<term>
<constant>XML_ERROR_NO_ELEMENTS</constant>
<constant>XML_ERROR_NO_ELEMENTS</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -52,7 +52,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-invalid-token">
<term>
<constant>XML_ERROR_INVALID_TOKEN</constant>
<constant>XML_ERROR_INVALID_TOKEN</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -63,7 +63,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-unclosed-token">
<term>
<constant>XML_ERROR_UNCLOSED_TOKEN</constant>
<constant>XML_ERROR_UNCLOSED_TOKEN</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -74,7 +74,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-partial-char">
<term>
<constant>XML_ERROR_PARTIAL_CHAR</constant>
<constant>XML_ERROR_PARTIAL_CHAR</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -85,7 +85,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-tag-mismatch">
<term>
<constant>XML_ERROR_TAG_MISMATCH</constant>
<constant>XML_ERROR_TAG_MISMATCH</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -96,7 +96,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-duplicate-attribute">
<term>
<constant>XML_ERROR_DUPLICATE_ATTRIBUTE</constant>
<constant>XML_ERROR_DUPLICATE_ATTRIBUTE</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -107,7 +107,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-junk-after-doc-element">
<term>
<constant>XML_ERROR_JUNK_AFTER_DOC_ELEMENT</constant>
<constant>XML_ERROR_JUNK_AFTER_DOC_ELEMENT</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -118,7 +118,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-param-entity-ref">
<term>
<constant>XML_ERROR_PARAM_ENTITY_REF</constant>
<constant>XML_ERROR_PARAM_ENTITY_REF</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -129,7 +129,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-undefined-entity">
<term>
<constant>XML_ERROR_UNDEFINED_ENTITY</constant>
<constant>XML_ERROR_UNDEFINED_ENTITY</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -140,7 +140,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-recursive-entity-ref">
<term>
<constant>XML_ERROR_RECURSIVE_ENTITY_REF</constant>
<constant>XML_ERROR_RECURSIVE_ENTITY_REF</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -151,7 +151,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-async-entity">
<term>
<constant>XML_ERROR_ASYNC_ENTITY</constant>
<constant>XML_ERROR_ASYNC_ENTITY</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -162,7 +162,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-bad-char-ref">
<term>
<constant>XML_ERROR_BAD_CHAR_REF</constant>
<constant>XML_ERROR_BAD_CHAR_REF</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -173,7 +173,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-binary-entity-ref">
<term>
<constant>XML_ERROR_BINARY_ENTITY_REF</constant>
<constant>XML_ERROR_BINARY_ENTITY_REF</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -184,7 +184,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-attribute-external-entity-ref">
<term>
<constant>XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF</constant>
<constant>XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -195,7 +195,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-misplaced-xml-pi">
<term>
<constant>XML_ERROR_MISPLACED_XML_PI</constant>
<constant>XML_ERROR_MISPLACED_XML_PI</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -206,7 +206,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-unknown-encoding">
<term>
<constant>XML_ERROR_UNKNOWN_ENCODING</constant>
<constant>XML_ERROR_UNKNOWN_ENCODING</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -217,7 +217,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-incorrect-encoding">
<term>
<constant>XML_ERROR_INCORRECT_ENCODING</constant>
<constant>XML_ERROR_INCORRECT_ENCODING</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -228,7 +228,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-unclosed-cdata-section">
<term>
<constant>XML_ERROR_UNCLOSED_CDATA_SECTION</constant>
<constant>XML_ERROR_UNCLOSED_CDATA_SECTION</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -239,7 +239,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-error-external-entity-handling">
<term>
<constant>XML_ERROR_EXTERNAL_ENTITY_HANDLING</constant>
<constant>XML_ERROR_EXTERNAL_ENTITY_HANDLING</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -250,7 +250,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-option-case-folding">
<term>
<constant>XML_OPTION_CASE_FOLDING</constant>
<constant>XML_OPTION_CASE_FOLDING</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -259,9 +259,21 @@
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.xml-option-parse-huge">
<term>
<constant>XML_OPTION_PARSE_HUGE</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
自 PHP 8.4.0 起可用。
当使用 libxml2 &lt; 2.7.0 时(例如在 PHP 7.x 上),此选项默认启用且无法禁用。
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.xml-option-target-encoding">
<term>
<constant>XML_OPTION_TARGET_ENCODING</constant>
<constant>XML_OPTION_TARGET_ENCODING</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -272,7 +284,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-option-skip-tagstart">
<term>
<constant>XML_OPTION_SKIP_TAGSTART</constant>
<constant>XML_OPTION_SKIP_TAGSTART</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -283,7 +295,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-option-skip-white">
<term>
<constant>XML_OPTION_SKIP_WHITE</constant>
<constant>XML_OPTION_SKIP_WHITE</constant>
(<type>int</type>)
</term>
<listitem>
Expand All @@ -294,7 +306,7 @@
</varlistentry>
<varlistentry xml:id="constant.xml-sax-impl">
<term>
<constant>XML_SAX_IMPL</constant>
<constant>XML_SAX_IMPL</constant>
(<type>string</type>)
</term>
<listitem>
Expand Down
11 changes: 7 additions & 4 deletions reference/xml/functions/xml-parser-get-option.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9fb00a4cf8563ea56d53cb1f72e2856b68899646 Maintainer: class007 Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 9acfa18973f304f8f2d531f28dd12b12c2b84f8b Maintainer: class007 Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.xml-parser-get-option" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parser_get_option</refname>
Expand Down Expand Up @@ -36,8 +36,11 @@
<term><parameter>option</parameter></term>
<listitem>
<simpara>
要获取的选项。可以用 <constant>XML_OPTION_CASE_FOLDING</constant>、<constant>XML_OPTION_SKIP_TAGSTART</constant>、<constant>XML_OPTION_SKIP_WHITE</constant>
和 <constant>XML_OPTION_TARGET_ENCODING</constant>。参阅 <function>xml_parser_set_option</function> 获取相应描述。
要获取的选项。可以用 <constant>XML_OPTION_CASE_FOLDING</constant>、
<constant>XML_OPTION_PARSE_HUGE</constant>、
<constant>XML_OPTION_SKIP_TAGSTART</constant>、<constant>XML_OPTION_SKIP_WHITE</constant>
和 <constant>XML_OPTION_TARGET_ENCODING</constant>。
参阅 <function>xml_parser_set_option</function> 获取相应描述。
</simpara>
</listitem>
</varlistentry>
Expand Down
19 changes: 17 additions & 2 deletions reference/xml/functions/xml-parser-set-option.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9fb00a4cf8563ea56d53cb1f72e2856b68899646 Maintainer: class007 Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 9acfa18973f304f8f2d531f28dd12b12c2b84f8b Maintainer: class007 Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.xml-parser-set-option" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parser_set_option</refname>
Expand Down Expand Up @@ -59,6 +59,15 @@
控制是否为此 XML 解析器启用<link linkend="xml.case-folding">大写转换</link>。默认启用。
</entry>
</row>
<row>
<entry><constant>XML_OPTION_PARSE_HUGE</constant></entry>
<entry>bool</entry>
<entry>
允许解析大于 10 MB 的文档。
仅当文档大小有限时才应启用此选项,否则可能导致 DoS。
仅在使用 libxml2 时才可用。
</entry>
</row>
<row>
<entry><constant>XML_OPTION_SKIP_TAGSTART</constant></entry>
<entry>integer</entry>
Expand Down Expand Up @@ -128,6 +137,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
添加了选项 <constant>XML_OPTION_PARSE_HUGE</constant>。
</entry>
</row>
<row>
<entry>8.3.0</entry>
<entry>
Expand Down

0 comments on commit 4a436ed

Please sign in to comment.