protected function createIterator($subject)
	{
		if($subject === NULL)
		{
			return new \ArrayIterator([]);
		}
		
		if(is_array($subject))
		{
			return new \ArrayIterator($subject);
		}
		
		if($subject instanceof \Generator)
		{
			return $subject;
		}
		
		if($subject instanceof \Iterator)
		{
			$subject->rewind();
			
			return $subject;
		}
		
		if($subject instanceof \IteratorAggregate)
		{
			return $subject->getIterator();
		}
		
		if($subject instanceof \Traversable)
		{
			return new \IteratorIterator($subject);
		}
		
		if(is_object($subject))
		{
			return new \ArrayIterator(get_object_vars($subject));
		}
		
		throw new \InvalidArgumentException(sprintf('Unable to create an iterator from %s', gettype($subject)));
	}