SPL-StandardPHPLibrary
Public Member Functions
EmptyIterator Class Reference
Inheritance diagram for EmptyIterator:
Inheritance graph
[legend]
Collaboration diagram for EmptyIterator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 current ()
 key ()
 next ()
 rewind ()
 valid ()

Detailed Description

An empty Iterator.

Author:
Marcus Boerger
Version:
1.0
Since:
PHP 5.1

Definition at line 18 of file emptyiterator.inc.


Member Function Documentation

EmptyIterator::current ( )

This function must not be called.

It throws an exception upon access.

Exceptions:
Exception
Returns:
void

Implements Iterator.

Definition at line 39 of file emptyiterator.inc.

    {
        throw new Exception('Accessing the value of an EmptyIterator');
    }
EmptyIterator::key ( )

This function must not be called.

It throws an exception upon access.

Exceptions:
Exception
Returns:
void

Implements Iterator.

Definition at line 48 of file emptyiterator.inc.

    {
        throw new Exception('Accessing the key of an EmptyIterator');
    }
EmptyIterator::next ( )

No operation.

Returns:
void

Implements Iterator.

Definition at line 56 of file emptyiterator.inc.

    {
        // nothing to do
    }
EmptyIterator::rewind ( )

No operation.

Returns:
void

Implements Iterator.

Definition at line 23 of file emptyiterator.inc.

    {
        // nothing to do
    }
EmptyIterator::valid ( )
Returns:
false

Implements Iterator.

Definition at line 30 of file emptyiterator.inc.

    {
        return false;
    }

The documentation for this class was generated from the following file: