addRange() public method

The collection will be reindexed.
public addRange ( array | Traversable $values ) : void
$values array | Traversable The values to add
return void
Example #1
0
 public function visitAddValues(Operations\AddValues $operation)
 {
     $this->collection->addRange(Traversable\ScopeEvaluator::evaluateSource($operation->getSource(), $this->parameters));
 }
Example #2
0
 /**
  * @dataProvider oneToTen
  * @expectedException \Pinq\PinqException
  */
 public function testThatInvalidValueThrowsExceptionWhenCallingAddRange(\Pinq\ICollection $collection, array $data)
 {
     $collection->addRange(1);
 }