addId() public method

Adds a standard parameter id to the collection.
public addId ( $parameterId, Pinq\Providers\DSL\Compilation\Parameters\IParameterHasher $hasher, mixed $data = null ) : void
$parameterId
$hasher Pinq\Providers\DSL\Compilation\Parameters\IParameterHasher
$data mixed
return void
 public function visitOrderBy(Segments\OrderBy $segment)
 {
     foreach ($segment->getOrderings() as $ordering) {
         $this->parameters->addId($ordering->getIsAscendingId(), ParameterHasher::valueType());
     }
     return parent::visitOrderBy($segment);
 }
 public function testRemoveParameter()
 {
     $this->collection->addId('foo', ParameterHasher::valueType());
     $this->collection->addId('bar', ParameterHasher::valueType());
     $this->assertCount(2, $this->collection->getParameters());
     $parameters = $this->collection->getParameters();
     $this->collection->remove($parameters[0]);
     $this->assertSame([1 => $parameters[1]], $this->collection->getParameters());
     $this->collection->remove($parameters[1]);
     $this->assertSame([], $this->collection->getParameters());
 }
 public function visitRange(Segments\Range $segment)
 {
     $this->parameters->addId($segment->getStartId(), ParameterHasher::valueType());
     $this->parameters->addId($segment->getAmountId(), ParameterHasher::valueType());
     return parent::visitRange($segment);
 }