13
13
*
14
14
* The only thing a class has to do is
15
15
*/
16
- interface iterator {
16
+ interface spl_iterator {
17
17
18
18
/*! \brief Create a new iterator
19
19
*
@@ -29,7 +29,7 @@ function new_iterator();
29
29
* can be used as a parameter to be iterated (normally an array).
30
30
*
31
31
* \code
32
- class c implements spl_foreach , spl_forward {
32
+ class c implements spl_iterator , spl_forward {
33
33
private $num = 0;
34
34
function new_iterator() {
35
35
$this->num = 0;
@@ -62,7 +62,7 @@ function has_more() {
62
62
* If you need this you must split the two parts.
63
63
*
64
64
* \code
65
- class c implements spl_foreach {
65
+ class c implements spl_iterator {
66
66
public $max = 3;
67
67
function new_iterator() {
68
68
return new c_iter($this);
@@ -97,7 +97,7 @@ function has_more() {
97
97
* You can also use this interface with the for() construct.
98
98
*
99
99
* \code
100
- class c implements spl_foreach {
100
+ class c implements spl_iterator {
101
101
public $max = 3;
102
102
function new_iterator() {
103
103
return new c_iter($this);
@@ -127,7 +127,7 @@ function has_more() {
127
127
}
128
128
\endcode
129
129
*/
130
- interface forward {
130
+ interface spl_forward {
131
131
132
132
/*! \brief Retrieve the current currentent
133
133
*
@@ -155,7 +155,7 @@ function has_more();
155
155
* \note If you use sequence in foreach then rewind() will be called
156
156
* first.
157
157
*/
158
- interface sequence extends forward {
158
+ interface spl_sequence extends spl_forward {
159
159
160
160
/*! Restart the sequence by positioning it to the first element.
161
161
*/
@@ -167,7 +167,7 @@ function rewind();
167
167
* This interface allows to implement associative iterators
168
168
* and containers.
169
169
*/
170
- interface assoc {
170
+ interface spl_assoc {
171
171
172
172
/*! \brief Retrieve the current elements key
173
173
*
@@ -185,17 +185,17 @@ function key();
185
185
foreach($t as $key => $elem).
186
186
\endcode
187
187
*/
188
- interface assoc_forward extends forward implements assoc {
188
+ interface spl_assoc_forward implements spl_forward, spl_assoc {
189
189
}
190
190
191
191
/*! \brief associative sequence
192
192
*/
193
- interface assoc_sequence extends sequence implements assoc {
193
+ interface spl_assoc_sequence implements spl_sequence, spl_assoc {
194
194
}
195
195
196
196
/*! \brief array read only access for objects
197
197
*/
198
- interface array_read {
198
+ interface spl_array_read {
199
199
200
200
/*! Check whether or not the given index exists.
201
201
* The returned value is interpreted as converted to bool.
@@ -226,7 +226,7 @@ function set($index, $value) {
226
226
}
227
227
\endcode
228
228
*/
229
- interface array_access extends array_read {
229
+ interface spl_array_access extends spl_array_read {
230
230
231
231
/*! Set the value identified by $index to $value.
232
232
*/
@@ -254,7 +254,7 @@ function new_writer($index) {
254
254
}
255
255
\endcode
256
256
*/
257
- interface array_access_ex extends array_access {
257
+ interface spl_array_access_ex extends spl_array_access {
258
258
259
259
/*! Create an array_writer interface for the specified index.
260
260
*
@@ -294,7 +294,7 @@ function set($value) {
294
294
*
295
295
* See array_access for more.
296
296
*/
297
- interface array_writer {
297
+ interface spl_array_writer {
298
298
299
299
/*! Set the corresponding value to $value.
300
300
*/
0 commit comments