diff options
Diffstat (limited to 'ext/spl/examples/emptyiterator.inc')
-rwxr-xr-x | ext/spl/examples/emptyiterator.inc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ext/spl/examples/emptyiterator.inc b/ext/spl/examples/emptyiterator.inc index 34b5118e74..1a79173938 100755 --- a/ext/spl/examples/emptyiterator.inc +++ b/ext/spl/examples/emptyiterator.inc @@ -1,6 +1,6 @@ <?php -/** +/** \ingroup Examples * @brief An empty Iterator * @author Marcus Boerger * @version 1.0 @@ -8,26 +8,42 @@ */ class EmptyIterator implements Iterator { + /** No operation. + * @return void + */ function rewind() { // nothing to do } + /** @return \c false + */ function valid() { return false; } + /** This function must not be called. It throws an exception upon access. + * @throw Exception + * @return void + */ function current() { throw new Exception('Accessing the value of an EmptyIterator'); } + /** This function must not be called. It throws an exception upon access. + * @throw Exception + * @return void + */ function key() { throw new Exception('Accessing the key of an EmptyIterator'); } + /** No operation. + * @return void + */ function next() { // nothing to do |