yii\web\HeaderCollection::getIterator PHP Method

getIterator() public method

This method is required by the SPL interface [[\IteratorAggregate]]. It will be implicitly called when you use foreach to traverse the collection.
public getIterator ( ) : ArrayIterator
return ArrayIterator an iterator for traversing the headers in the collection.
    public function getIterator()
    {
        return new ArrayIterator($this->_headers);
    }