reference/reflection/reflectionclass/isiterateable.xml
1046d428ad83d2ac0b22456e4106096ca2f0a991
...
...
@@ -4,86 +4,15 @@
4
4
<refentry xml:id="reflectionclass.isiterateable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
5
<refnamediv>
6
6
<refname>ReflectionClass::isIterateable</refname>
7
-
<refpurpose>Checks if iterateable</refpurpose>
7
+
<refpurpose>&Alias; <methodname>ReflectionClass::isIterable</methodname></refpurpose>
8
8
</refnamediv>
9
9

10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<methodsynopsis>
13
-
<modifier>public</modifier> <type>bool</type><methodname>ReflectionClass::isIterateable</methodname>
14
-
<void />
15
-
</methodsynopsis>
12
+
<para>&Alias; <methodname>ReflectionClass::isIterable</methodname></para>
16
13
<para>
17
-
Checks whether the class is iterateable.
18
-
</para>
19
-
</refsect1>
20
-

21
-
<refsect1 role="parameters">
22
-
&reftitle.parameters;
23
-
&no.function.parameters;
24
-
</refsect1>
25
-

26
-
<refsect1 role="returnvalues">
27
-
&reftitle.returnvalues;
28
-
<para>
29
-
&return.success;
30
-
</para>
31
-
</refsect1>
32
-

33
-
<refsect1 role="examples">
34
-
&reftitle.examples;
35
-
<para>
36
-
<example>
37
-
<title><methodname>ReflectionClass::isIterateable</methodname> example</title>
38
-
<programlisting role="php">
39
-
<![CDATA[
40
-
<?php
41
-

42
-
class IteratorClass implements Iterator {
43
-
public function __construct() { }
44
-
public function key() { }
45
-
public function current() { }
46
-
function next() { }
47
-
function valid() { }
48
-
function rewind() { }
49
-
}
50
-
class DerivedClass extends IteratorClass { }
51
-
class NonIterator { }
52
-

53
-
function dump_iterateable($class) {
54
-
$reflection = new ReflectionClass($class);
55
-
var_dump($reflection->isIterateable());
56
-
}
57
-

58
-
$classes = array("ArrayObject", "IteratorClass", "DerivedClass", "NonIterator");
59
-

60
-
foreach ($classes as $class) {
61
-
echo "Is $class iterateable? ";
62
-
dump_iterateable($class);
63
-
}
64
-
?>
65
-
]]>
66
-
</programlisting>
67
-
&example.outputs;
68
-
<screen>
69
-
<![CDATA[
70
-
Is ArrayObject iterateable? bool(true)
71
-
Is IteratorClass iterateable? bool(true)
72
-
Is DerivedClass iterateable? bool(true)
73
-
Is NonIterator iterateable? bool(false)
74
-
]]>
75
-
</screen>
76
-
</example>
77
-
</para>
78
-
</refsect1>
79
-

80
-

81
-
<refsect1 role="seealso">
82
-
&reftitle.seealso;
83
-
<para>
84
-
<simplelist>
85
-
<member><methodname>ReflectionClass::__construct</methodname></member>
86
-
</simplelist>
14
+
As of PHP 7.2.0, instead of the missspelled <methodname>RefectionClass::isIterateable</methodname>,
15
+
<methodname>ReflectionClass::isIterable</methodname> should be preferred.
87
16
</para>
88
17
</refsect1>
89
18

90
19