Skip to content

Commit

Permalink
Update spl
Browse files Browse the repository at this point in the history
  • Loading branch information
mowangjuanzi committed Aug 30, 2023
1 parent 5fee401 commit f9b6bd5
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 30 deletions.
4 changes: 2 additions & 2 deletions reference/spl/arrayiterator.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: bfef87dc15cdab5c438e716cd939b75e6ee5d4f5 Maintainer: Szopen Xiao Status: ready -->
<!-- EN-Revision: 73c2b06c2a7baa614ea98022b1ad0529e3c7e680 Maintainer: Szopen Xiao Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<phpdoc:classref xml:id="class.arrayiterator" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ArrayIterator 类</title>
Expand All @@ -12,7 +12,7 @@
<section xml:id="arrayiterator.intro">
&reftitle.intro;
<para>
这个迭代器允许在遍历数组和对象时删除和更新值与键
允许在迭代数组和对象时删除元素以及更新值或键
</para>
<para>
当你想多次遍历相同数组时你需要实例化 ArrayObject,然后让这个实例创建一个 ArrayIterator 实例。
Expand Down
14 changes: 4 additions & 10 deletions reference/spl/countable.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: 96a8379cd86b3ca4f1f5b2b94c5fb263f38050fd Maintainer: Szopen Xiao Status: ready -->
<!-- EN-Revision: 9eb4a46bba05da229be4c8f7a3cb64702e1a2f95 Maintainer: Szopen Xiao Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<phpdoc:classref xml:id="class.countable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

Expand All @@ -24,15 +24,9 @@

<!-- {{{ Synopsis -->
<classsynopsis class="interface">
<ooclass>
<classname>Countable</classname>
</ooclass>

<classsynopsisinfo>
<oointerface>
<interfacename>Countable</interfacename>
</oointerface>
</classsynopsisinfo>
<oointerface>
<interfacename>Countable</interfacename>
</oointerface>

<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.countable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Countable'])">
Expand Down
13 changes: 12 additions & 1 deletion reference/spl/functions/class-implements.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: 42bd1bfed391b287e55e47fed1b8f8d22a033ee0 Maintainer: Altair Status: ready -->
<!-- EN-Revision: 60af8c2b746d51c1556cc2ddc4d4163222347b96 Maintainer: Altair Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.class-implements" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -99,12 +99,23 @@ Array
</para>
</refsect1>

<refsect1 role="notes">
&reftitle.notes;
<note>
<simpara>
检测对象是否 implements interface,应该使用 &instanceof; 或 <function>is_a</function> 函数。
</simpara>
</note>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>class_parents</function></member>
<member><function>get_declared_interfaces</function></member>
<member><function>is_a</function></member>
<member>&instanceof;</member>
</simplelist>
</para>
</refsect1>
Expand Down
13 changes: 12 additions & 1 deletion reference/spl/functions/class-parents.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: 42bd1bfed391b287e55e47fed1b8f8d22a033ee0 Maintainer: Altair Status: ready -->
<!-- EN-Revision: 60af8c2b746d51c1556cc2ddc4d4163222347b96 Maintainer: Altair Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.class-parents" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -98,11 +98,22 @@ Array
</para>
</refsect1>

<refsect1 role="notes">
&reftitle.notes;
<note>
<simpara>
检测对象是否 implements interface,应该使用 &instanceof; 或 <function>is_a</function> 函数。
</simpara>
</note>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>class_implements</function></member>
<member><function>is_a</function></member>
<member>&instanceof;</member>
</simplelist>
</para>
</refsect1>
Expand Down
10 changes: 8 additions & 2 deletions reference/spl/functions/spl-object-hash.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: 8d226f128f09ad90410ce805d8c0bb9f27e70d4a Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: f7e42edba898d3a07f5213360e9464fbf526b20e Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.spl-object-hash" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -69,7 +69,13 @@ $storage[$id] = $object;
当对象销毁后,它的散列值可能会被其它对象重用。
</para>
</note>
</refsect1>
<note>
<para>
对象散列应该使用 <code>===</code> 和 <code>!==</code> 标识符比较,因为返回的散列可能是<link
linkend="language.types.numeric-strings">数字字符串</link>。例如:<literal>0000000000000e600000000000000000</literal>。
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
23 changes: 9 additions & 14 deletions reference/spl/seekableiterator.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: 96a8379cd86b3ca4f1f5b2b94c5fb263f38050fd Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 9eb4a46bba05da229be4c8f7a3cb64702e1a2f95 Maintainer: mowangjuanzi Status: ready -->
<phpdoc:classref xml:id="class.seekableiterator" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

<title>SeekableIterator 接口</title>
Expand All @@ -22,19 +22,14 @@

<!-- {{{ Synopsis -->
<classsynopsis class="interface">
<ooclass>
<classname>SeekableIterator</classname>
</ooclass>

<classsynopsisinfo>
<oointerface>
<interfacename>SeekableIterator</interfacename>
</oointerface>

<oointerface>
<interfacename>Iterator</interfacename>
</oointerface>
</classsynopsisinfo>
<oointerface>
<interfacename>SeekableIterator</interfacename>
</oointerface>

<oointerface>
<modifier>extends</modifier>
<interfacename>Iterator</interfacename>
</oointerface>

<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.seekableiterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='SeekableIterator'])">
Expand Down

0 comments on commit f9b6bd5

Please sign in to comment.