PHP Класс CMapIterator, php_design_patterns

Позволяет экземпляру класса CMap возвращать новый итератор для обхода элементов карты.
С версии: 1.0
Автор: Qiang Xue ([email protected])
Наследование: implements Iterator
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( &$data ) Constructor.
current ( ) : mixed Returns the current array element.
key ( ) : mixed Returns the key of the current array element.
next ( ) Moves the internal pointer to the next array element.
rewind ( ) Rewinds internal array pointer.
valid ( ) : boolean Returns whether there is an element at current position.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( &$data )

current() публичный Метод

This method is required by the interface Iterator.
public current ( ) : mixed
Результат mixed the current array element

key() публичный Метод

This method is required by the interface Iterator.
public key ( ) : mixed
Результат mixed the key of the current array element

next() публичный Метод

This method is required by the interface Iterator.
public next ( )

rewind() публичный Метод

This method is required by the interface Iterator.
public rewind ( )

valid() публичный Метод

This method is required by the interface Iterator.
public valid ( ) : boolean
Результат boolean