php-src/ext/spl/examples/emptyiterator.inc
Marcus Boerger 68c22fba72 - Documentation update
- Checkin doxygen config file
# A patched version of doxygen is needed, hopefully 1.3.8 will contain it
2004-05-10 17:26:03 +00:00

62 lines
977 B
PHP
Executable File

<?php
/** @file emptyiterator.inc
* @ingroup Examples
* @brief class EmptyIterator
* @author Marcus Boerger
* @date 2003 - 2004
*
* SPL - Standard PHP Library
*/
/** @ingroup Examples
* @brief An empty Iterator
* @author Marcus Boerger
* @version 1.0
*
*/
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
}
}
?>