*
* The only thing a class has to do is
*/
-interface iterator {
+interface spl_iterator {
/*! \brief Create a new iterator
*
* can be used as a parameter to be iterated (normally an array).
*
* \code
- class c implements spl_foreach, spl_forward {
+ class c implements spl_iterator, spl_forward {
private $num = 0;
function new_iterator() {
$this->num = 0;
* If you need this you must split the two parts.
*
* \code
- class c implements spl_foreach {
+ class c implements spl_iterator {
public $max = 3;
function new_iterator() {
return new c_iter($this);
* You can also use this interface with the for() construct.
*
* \code
- class c implements spl_foreach {
+ class c implements spl_iterator {
public $max = 3;
function new_iterator() {
return new c_iter($this);
}
\endcode
*/
-interface forward {
+interface spl_forward {
/*! \brief Retrieve the current currentent
*
* \note If you use sequence in foreach then rewind() will be called
* first.
*/
-interface sequence extends forward {
+interface spl_sequence extends spl_forward {
/*! Restart the sequence by positioning it to the first element.
*/
* This interface allows to implement associative iterators
* and containers.
*/
-interface assoc {
+interface spl_assoc {
/*! \brief Retrieve the current elements key
*
foreach($t as $key => $elem).
\endcode
*/
-interface assoc_forward extends forward implements assoc {
+interface spl_assoc_forward implements spl_forward, spl_assoc {
}
/*! \brief associative sequence
*/
-interface assoc_sequence extends sequence implements assoc {
+interface spl_assoc_sequence implements spl_sequence, spl_assoc {
}
/*! \brief array read only access for objects
*/
-interface array_read {
+interface spl_array_read {
/*! Check whether or not the given index exists.
* The returned value is interpreted as converted to bool.
}
\endcode
*/
-interface array_access extends array_read {
+interface spl_array_access extends spl_array_read {
/*! Set the value identified by $index to $value.
*/
}
\endcode
*/
-interface array_access_ex extends array_access {
+interface spl_array_access_ex extends spl_array_access {
/*! Create an array_writer interface for the specified index.
*
*
* See array_access for more.
*/
-interface array_writer {
+interface spl_array_writer {
/*! Set the corresponding value to $value.
*/