for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the 2amigos/yii2-exportable-widget project.
* (c) 2amigOS! <http://2amigos.us/>
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace dosamigos\exportable\iterators;
use dosamigos\exportable\contracts\SourceIteratorInterface;
use Iterator;
/**
* SourceIterator implementation based on Iterator.
class SourceIterator implements SourceIteratorInterface
{
* @var Iterator
protected $iterator;
* @param Iterator $iterator Iterator with string array elements
public function __construct(Iterator $iterator)
$this->iterator = $iterator;
}
* @return Iterator
public function getIterator()
return $this->iterator;
* {@inheritdoc}
public function current()
return $this->iterator->current();
public function next()
$this->iterator->next();
public function key()
return $this->iterator->key();
public function valid()
return $this->iterator->valid();
public function rewind()
$this->iterator->rewind();