language/predefined/traversable.xml
c777ef397d0c333ce142ab8122abcad2aa63ba83
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<phpdoc:classref xml:id="class.traversable" 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">
5
4

6
5
<title>The <interfacename>Traversable</interfacename> interface</title>
...
...
@@ -15,29 +14,10 @@
15
14
Interface to detect if a class is traversable using &foreach;.
16
15
</para>
17
16
<para>
18
-
Abstract base interface that cannot be implemented alone. Instead it must
17
+
Abstract base interface that cannot be implemented alone. Instead, it must
19
18
be implemented by either <interfacename>IteratorAggregate</interfacename> or
20
19
<interfacename>Iterator</interfacename>.
21
20
</para>
22
-
<note>
23
-
<para>
24
-
Internal (built-in) classes that implement this interface can be used in
25
-
a &foreach; construct and do not need to implement
26
-
<interfacename>IteratorAggregate</interfacename> or
27
-
<interfacename>Iterator</interfacename>.
28
-
</para>
29
-
</note>
30
-
<note>
31
-
<para>
32
-
This is an internal engine interface which cannot be implemented in PHP
33
-
scripts. Either <interfacename>IteratorAggregate</interfacename> or
34
-
<interfacename>Iterator</interfacename> must be used instead.
35
-
When implementing an interface which extends Traversable, make sure to
36
-
list <interfacename>IteratorAggregate</interfacename> or
37
-
<interfacename>Iterator</interfacename> before its name in the implements
38
-
clause.
39
-
</para>
40
-
</note>
41
21
</section>
42
22
<!-- }}} -->
43
23

...
...
@@ -45,17 +25,10 @@
45
25
&reftitle.interfacesynopsis;
46
26

47
27
<!-- {{{ Synopsis -->
48
-
<classsynopsis>
49
-
<ooclass><classname>Traversable</classname></ooclass>
50
-

51
-
<!-- {{{ Class synopsis -->
52
-
<classsynopsisinfo>
53
-
<ooclass>
54
-
<classname>Traversable</classname>
55
-
</ooclass>
56
-
</classsynopsisinfo>
57
-
<!-- }}} -->
58
-

28
+
<classsynopsis class="interface">
29
+
<oointerface>
30
+
<interfacename>Traversable</interfacename>
31
+
</oointerface>
59
32
</classsynopsis>
60
33
<!-- }}} -->
61
34

...
...
@@ -66,10 +39,53 @@
66
39

67
40
</section>
68
41

42
+
<section role="changelog">
43
+
&reftitle.changelog;
44
+
<informaltable>
45
+
<tgroup cols="2">
46
+
<thead>
47
+
<row>
48
+
<entry>&Version;</entry>
49
+
<entry>&Description;</entry>
50
+
</row>
51
+
</thead>
52
+
<tbody>
53
+
<row>
54
+
<entry>7.4.0</entry>
55
+
<entry>
56
+
The <interfacename>Traversable</interfacename> interface can now be implemented
57
+
by abstract classes. Extending classes must implement
58
+
<interfacename>Iterator</interfacename> or
59
+
<interfacename>IteratorAggregate</interfacename>.
60
+
</entry>
61
+
</row>
62
+
</tbody>
63
+
</tgroup>
64
+
</informaltable>
65
+
</section>
66
+

67
+
<section role="notes">
68
+
&reftitle.notes;
69
+
<note>
70
+
<para>
71
+
Internal (built-in) classes that implement this interface can be used in
72
+
a &foreach; construct and do not need to implement
73
+
<interfacename>IteratorAggregate</interfacename> or
74
+
<interfacename>Iterator</interfacename>.
75
+
</para>
76
+
</note>
77
+
<note>
78
+
<para>
79
+
Prior to PHP 7.4.0, this internal engine interface couldn't be implemented
80
+
in PHP scripts. Either <interfacename>IteratorAggregate</interfacename>
81
+
or <interfacename>Iterator</interfacename> must be used instead.
82
+
</para>
83
+
</note>
84
+
</section>
85
+

69
86
</partintro>
70
87

71
88
</phpdoc:classref>
72
-

73
89
<!-- Keep this comment at the end of the file
74
90
Local variables:
75
91
mode: sgml
...
...
@@ -90,4 +106,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
90
106
vim: et tw=78 syn=sgml
91
107
vi: ts=1 sw=1
92
108
-->
93
-

94
109