phpstreams\operations\LimitOperation::getIterator PHP Method

getIterator() public method

public getIterator ( )
    public function getIterator()
    {
        $limit = $this->limit;
        foreach ($this->source as $key => $value) {
            if (--$limit < 0) {
                return;
            }
            (yield $key => $value);
        }
    }