reference/spl/datastructures.xml
e93feee2870bb551cd11d625271b7f82da3ccb05
e93feee2870bb551cd11d625271b7f82da3ccb05
...
...
@@ -1,9 +1,7 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
4
-
<part xml:id="spl.datastructures" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
-
6
-
&spl.datastructures.intro.title;
3
+
<part xml:id="spl.datastructures" xmlns="http://docbook.org/ns/docbook">
4
+
<title>Datastructures</title>
7
5
8
6
<partintro>
9
7
<para>
...
...
@@ -17,7 +15,7 @@
17
15
18
16
<para>
19
17
A Doubly Linked List (DLL) is a list of nodes linked in both directions to
20
-
each others. Iterator's operations, access to both ends, addition or
18
+
each other. Iterator's operations, access to both ends, addition or
21
19
removal of nodes have a cost of O(1) when the underlying structure is a DLL.
22
20
It hence provides a decent implementation for stacks and queues.
23
21
</para>
...
...
@@ -61,10 +59,17 @@
61
59
<title>Arrays</title>
62
60
63
61
<para>
64
-
Arrays are structures that store the data in a continuous way, accessible
65
-
via indexes. Don't confuse them with PHP arrays: PHP arrays are in fact
66
-
implemented as ordered hashtables.
62
+
Arrays are structures that store the data in a contiguous way,
63
+
accessible via indexes.
67
64
</para>
65
+
<note>
66
+
<simpara>
67
+
Do not confuse this with PHP's native <type>array</type> type.
68
+
PHP arrays are in reality ordered hashtables.
69
+
However, SPL provides the <classname>ArrayObject</classname> class
70
+
to wrap PHP arrays into an object.
71
+
</simpara>
72
+
</note>
68
73
69
74
<itemizedlist>
70
75
<listitem>
...
...
@@ -100,12 +105,11 @@
100
105
&reference.spl.splpriorityqueue;
101
106
102
107
&reference.spl.splfixedarray;
108
+
&reference.spl.arrayobject;
109
+
103
110
&reference.spl.splobjectstorage;
104
111
105
112
</part>
106
-
107
-
108
-
109
113
<!-- Keep this comment at the end of the file
110
114
Local variables:
111
115
mode: sgml
...
...
@@ -126,4 +130,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
126
130
vim: et tw=78 syn=sgml
127
131
vi: ts=1 sw=1
128
132
-->
129
-
130
133