for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Maketok\DataMigration\Input;
class ArrayInput implements InputResourceInterface, \Iterator
{
/**
* @var array
*/
private $entries = [];
* @var int
private $index = 0;
* {@inheritdoc}
public function get()
if (!$this->valid()) {
return false;
}
$current = $this->current();
$this->next();
return $current;
public function add(array $entity)
$this->entries[] = $entity;
public function reset()
$this->rewind();
public function current()
return $this->entries[$this->index];
public function next()
$this->index += 1;
public function key()
return $this->index;
public function valid()
return isset($this->entries[$this->index]);
public function rewind()
$this->index = 0;