reference/array/functions/array-walk-recursive.xml
d42b32e96ba3a36544b453128b5f515166bfc14c
...
...
@@ -1,4 +1,4 @@
1
-
<?xml version='1.0' encoding='iso-8859-1'?>
1
+
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<refentry xml:id="function.array-walk-recursive" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
...
...
@@ -9,13 +9,13 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>array_walk_recursive</methodname>
12
-
<methodparam><type>array</type><parameter role="reference">input</parameter></methodparam>
13
-
<methodparam><type>callback</type><parameter>funcname</parameter></methodparam>
14
-
<methodparam choice="opt"><type>mixed</type><parameter>userdata</parameter></methodparam>
12
+
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
13
+
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
14
+
<methodparam choice="opt"><type>mixed</type><parameter>arg</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
Applies the user-defined function <parameter>funcname</parameter> to each
18
-
element of the <parameter>input</parameter> array. This function will recur
17
+
Applies the user-defined <parameter>callback</parameter> function to each
18
+
element of the <parameter>array</parameter>. This function will recurse
19
19
into deeper arrays.
20
20
</para>
21
21
</refsect1>
...
...
@@ -24,7 +24,7 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>input</parameter></term>
27
+
<term><parameter>array</parameter></term>
28
28
<listitem>
29
29
<para>
30
30
The input array.
...
...
@@ -32,18 +32,18 @@
32
32
</listitem>
33
33
</varlistentry>
34
34
<varlistentry>
35
-
<term><parameter>funcname</parameter></term>
35
+
<term><parameter>callback</parameter></term>
36
36
<listitem>
37
37
<para>
38
-
Typically, <parameter>funcname</parameter> takes on two parameters.
39
-
The <parameter>input</parameter> parameter's value being the first, and
38
+
Typically, <parameter>callback</parameter> takes on two parameters.
39
+
The <parameter>array</parameter> parameter's value being the first, and
40
40
the key/index second.
41
41
</para>
42
42
<note>
43
43
<para>
44
-
If <parameter>funcname</parameter> needs to be working with the
44
+
If <parameter>callback</parameter> needs to be working with the
45
45
actual values of the array, specify the first parameter of
46
-
<parameter>funcname</parameter> as a
46
+
<parameter>callback</parameter> as a
47
47
<link linkend="language.references">reference</link>. Then,
48
48
any changes made to those elements will be made in the
49
49
original array itself.
...
...
@@ -52,12 +52,12 @@
52
52
</listitem>
53
53
</varlistentry>
54
54
<varlistentry>
55
-
<term><parameter>userdata</parameter></term>
55
+
<term><parameter>arg</parameter></term>
56
56
<listitem>
57
57
<para>
58
-
If the optional <parameter>userdata</parameter> parameter is supplied,
59
-
it will be passed as the third parameter to the callback
60
-
<parameter>funcname</parameter>.
58
+
If the optional <parameter>arg</parameter> parameter is supplied,
59
+
it will be passed as the third parameter to the
60
+
<parameter>callback</parameter>.
61
61
</para>
62
62
</listitem>
63
63
</varlistentry>
...
...
@@ -101,7 +101,7 @@ sour holds lemon
101
101
]]>
102
102
</screen>
103
103
<para>
104
-
You may notice that the key 'sweet' is never displayed. Any key that holds an
104
+
You may notice that the key '<literal>sweet</literal>' is never displayed. Any key that holds an
105
105
<type>array</type> will not be passed to the function.
106
106
</para>
107
107
</example>
...
...
@@ -112,7 +112,6 @@ sour holds lemon
112
112
<para>
113
113
<simplelist>
114
114
<member><function>array_walk</function></member>
115
-
<member>&seealso.callback;</member>
116
115
</simplelist>
117
116
</para>
118
117
</refsect1>
119
118