OuterIterator::getInnerIterator

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

OuterIterator::getInnerIteratorRetorna o iterador interno para a entrada atual

Descrição

public OuterIterator::getInnerIterator(): ?Iterator

Retorna o iterador interno para a entrada atual do iterador.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

Retorna o iterador interno para a entrada atual se existir, ou null caso contrário.

add a note add a note

User Contributed Notes 1 note

up
-1
Sjakie Pruts
4 years ago
The return type is merely documented here, it's not actually enforced. For instance, the IteratorIterator implementation can return Traversable, which would break the interface. Most likely, this is for backwards compatibility with code written before return type hints existed. It's still possible to create your own namespaced OuterIterator interface that extends the global one and add a typehint for this method in there.
To Top