adapter() public static method

public static adapter ( Traversable $iterator ) : Pinq\Iterators\Generators\IGenerator
$iterator Traversable
return Pinq\Iterators\Generators\IGenerator
Example #1
0
 public function setAll(\Traversable $elements)
 {
     $elements = GeneratorScheme::adapter($elements);
     foreach ($elements as $key => &$value) {
         $this->setRef($key, $value);
     }
 }
Example #2
0
 public final function updateSourceIterator(\Traversable $sourceIterator)
 {
     $clone = clone $this;
     $clone->iterator = GeneratorScheme::adapter($sourceIterator);
     return $clone;
 }