MapFieldIter
class MapFieldIter implements Iterator (View source)
MapFieldIter is used to iterate MapField. It is also need for the foreach syntax.
Methods
Create iterator instance for MapField.
Reset the status of the iterator
Return the element at the current position.
Return the current key.
Move to the next position.
Check whether there are more elements to iterate.
Details
__construct($container, $key_type)
Create iterator instance for MapField.
void
rewind()
Reset the status of the iterator
object
current()
Return the element at the current position.
object
key()
Return the current key.
void
next()
Move to the next position.
bool
valid()
Check whether there are more elements to iterate.