Skip to content

Commit

Permalink
ArrayIterator description: add tags and flesh out the description (#3933
Browse files Browse the repository at this point in the history
)

* Improving wording and add markup tags

* reference/spl/arrayiterator.xml Replace links with tags

Co-authored-by: Christoph M. Becker <[email protected]>

---------

Co-authored-by: Christoph M. Becker <[email protected]>
  • Loading branch information
mmalferov and cmb69 authored Oct 28, 2024
1 parent 2a52232 commit 077aab2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions reference/spl/arrayiterator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
&reftitle.intro;
<para>
Allows the removal of elements, and the modification of
keys or values while iterating over Arrays or Objects.
keys or values while iterating over <type>array</type>s or <type>object</type>s.
</para>
<para>
When you want to iterate over the same array multiple times you need to
instantiate ArrayObject and let it create ArrayIterator instances that
refer to it either by using &foreach; or by calling its getIterator()
method manually.
To iterate the same array more than once, it is recommended to
instantiate <classname>ArrayObject</classname> and use the
<classname>ArrayIterator</classname> instance either implicitly created when
using &foreach; to iterate over the array stored internally, or create one by
calling the <methodname>ArrayObject::getIterator</methodname> method manually.
</para>
</section>
<!-- }}} -->
Expand Down Expand Up @@ -82,7 +83,10 @@
<varlistentry xml:id="arrayiterator.constants.std-prop-list">
<term><constant>ArrayIterator::STD_PROP_LIST</constant></term>
<listitem>
<para>Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).</para>
<para>
Properties of the object have their normal functionality
when accessed as list (<function>var_dump</function>, &foreach;, etc.).
</para>
</listitem>
</varlistentry>

Expand Down

0 comments on commit 077aab2

Please sign in to comment.