Get iterator.

@return \ArrayIterator
17611
public function getIterator()
    {
        $refunds = [];
        $response = $this->httpRequest($this->getPath(), Requests::GET);
        foreach ($response->refunds as $refund) {
            $refunds[] = $this->populate($refund);
        }

        return new ArrayIterator($refunds);
    }
583091
public function getIterator()
	{
		if($this->shared)
		{
			foreach($this->bindings as $key => $binding)
			{
				if(empty($this->bound[$key]))
				{
					$this->bound[$key] = $this->container->getBound($binding);
				}
			}
			
			return new \ArrayIterator($this->bound);
		}
		
		$bound = [];
		
		foreach($this->bindings as $key => $binding)
		{
			$bound[$key] = $this->container->getBound($binding);
		}
		
		return new \ArrayIterator($bound);
	}
191248
public function getIterator()
    {
        $files = array();
        $iterator = $this->getFlyIterator(Directory::ITERATOR_FILE | Directory::ITERATOR_RECURSIVE);
        foreach ($iterator as $file) {
            $files[] = $this->getRelPath($file);
        }
        return new ArrayIterator($files);
    }
741925
public function getIterator() {
        // Make sure dynamic properties are retrieved prior to view properties.
        $this->obtain_dynamic_data();
        $ret = array();

        // Do not iterate over deprecated properties.
        $props = self::$standardproperties;
        unset($props['groupmembersonly']);

        foreach ($props as $key => $unused) {
            $ret[$key] = $this->__get($key);
        }
        return new ArrayIterator($ret);
    }
1270646
public function getIterator()
    {
        $isTraversal = (is_array($this->body) || $this->body instanceof \Traversable);

        return $isTraversal ? new \ArrayIterator($this->body) : new \ArrayIterator([]);
    }
976694
public function getIterator() {
        $ret = array();
        foreach (get_object_vars($this) as $key => $value) {
            if (substr($key, 0, 1) == '_') {
                if (method_exists($this, 'get'.$key)) {
                    $ret[substr($key, 1)] = $this->{'get'.$key}();
                } else {
                    $ret[substr($key, 1)] = $this->$key;
                }
            }
        }
        $ret['sequence'] = $this->get_sequence();
        $ret['course'] = $this->get_course();
        $ret = array_merge($ret, course_get_format($this->modinfo->get_course())->get_format_options($this->_section));
        return new ArrayIterator($ret);
    }
995183
public function getIterator()
    {
        if (is_null($this->iterator)) {
            $finder = $this->finderFactory->createFinder();
            $finder->files()->in($this->path);

            if (false === empty($this->extensions)) {
                $finder->name($this->getExtensionsRegex());
            }

            $this->iterator = $finder->getIterator();
        }

        return $this->iterator;
    }
428949
public function getIterator()
    {
        if ($this->offset > 0) {
            $key   = null;
            $index = 0;
            //Skip the first N
            while (false !== ($record = $this->statement->fetch())) {
                if ($key === $record[ $this->pkField ]) {
                    continue;
                }
                $key = $record[ $this->pkField ];
                if ($index++ === $this->offset) {
                    break;
                }
            }
            $current = $record;
        } else {
            $current = $this->statement->fetch();
        }

        $currentKey = $current[ $this->pkField ];

        $fetchedRecordCount = 1;
        do {
            yield $currentKey => $current;

            $current = $this->statement->fetch();
            if (empty($current)) {
                break;
            }
            if ($currentKey !== $current[ $this->pkField ]) {
                $currentKey = $current[ $this->pkField ];
                $fetchedRecordCount++;
            }
        } while ($fetchedRecordCount <= $this->limit);

        $this->statement->closeCursor();
    }
465556
public function getIterator()
    {
        $keys  = $this->keys();
        $count = count($keys);
        $index = 0;

        while ($index < $count) {
            $key   = $keys[$index];
            $value = $this->get($key);

            yield $key => $value;

            $index++;
        }
    }
425420
public function getIterator()
    {
        if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
            throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
        }

        if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
            return $this->searchInDirectory($this->dirs[0]);
        }

        $iterator = new \AppendIterator();
        foreach ($this->dirs as $dir) {
            $iterator->append($this->searchInDirectory($dir));
        }

        foreach ($this->iterators as $it) {
            $iterator->append($it);
        }

        return $iterator;
    }
649482
public function getIterator()
    {
        $csv = fopen($this->getConfig('file'), 'r');
        if ($csv === false) {
            throw new \RuntimeException('Unable to open file: ' . $this->getConfig('file'));
        }
        while (true) {
            $fields = fgetcsv(
                $csv,
                0,
                $this->getConfig('delimiter'),
                $this->getConfig('quote'),
                $this->getConfig('escape')
            );
            if ($fields === false) {
                break;
            }
            ++$this->line;
            if ($this->columns === null && $this->getConfig('header') === true) {
                $this->columns = array_map(function ($field) { return trim($field); }, $fields);
                if (count($this->columns) !== count(array_unique($this->columns))) {
                    throw new \RuntimeException(
                        'File does not have unique column headers: ' . $this->getConfig('file')
                    );
                }
            } else {
                $row = $this->getConfig('header') === true ? $this->map($fields) : $fields;
                yield empty($this->getConfig('callbacks')) === true ? $row : $this->callback($row);
            }
        }
        fclose($csv);
    }
1187982
public function getIterator() {
		if ($this->selection && count($this->rows) == 0) {
			$this->fetchAll();
		}
		return count($this->rows) > 0 ? new \ArrayIterator($this->rows) : new \ArrayIterator();
	}
1094082
private function getIterator()
    {
        if (null === $this->getPath()) {
            throw new \RuntimeException('Commands config path not set');
        }
        if (null === $this->it) {
            $this->it =  new \DirectoryIterator($this->getPath());
        }
        return $this->it;
    }
795074
public function getIterator()
    {
        foreach ($this->rawIterator() as $data) {
            $this->data = $this->persistence->typecastLoadRow($this, $data);
            if ($this->id_field) {
                $this->id = isset($data[$this->id_field]) ? $data[$this->id_field] : null;
            }

            // you can return false in afterLoad hook to prevent to yield this data row
            // use it like this:
            // $model->addHook('afterLoad', function ($m) {
            //     if ($m['date'] < $m->date_from) $m->breakHook(false);
            // })

            // you can also use breakHook() with specific object which will then be returned
            // as a next iterator value

            $ret = $this->hook('afterLoad');

            if ($ret === false) {
                continue;
            }

            if (is_object($ret)) {
                if ($ret->id_field) {
                    yield $ret->id => $ret;
                } else {
                    yield $ret;
                }
            } else {
                if ($this->id_field) {
                    yield $this->id => $this;
                } else {
                    yield $this;
                }
            }
        }

        $this->unload();
    }
326579
public function getIterator()
    {
        //Run the query
        $resp = $this->query->execute();

        //Return the documents as an ArrayIterator to satisfy the requirements
        //of the getIterator function.
        foreach ($resp->data as $document)
        {
            yield $document;
        }

        while ($resp->cursors->next) {
            //send a new request, resetting $resp
            $resp = $this->query->execute($resp->cursors->next);

            foreach ($resp->data as $document)
            {
                yield $document;
            }
        }
    }
1273423
public function getIterator()
    {
        $queue = new \SplPriorityQueue();

        $this->workers->rewind();
        while($this->workers->valid()) {

            $queue->insert(
                $this->workers->current(),
                $this->workers->getInfo()
            );

            $this->workers->next();
        }

        return $queue;
    }
759037
public function getIterator()
    {
        $this->reset();

        foreach ($this->iterator as $key => $value) {
            $this->position++;
            yield $key => $value;
        }
    }