Author: Elliot Levin (elliotlevin@hotmail.com)
Inheritance: extends ParameterCollectionBase
 public function visitOrderBy(Segments\OrderBy $segment)
 {
     foreach ($segment->getOrderings() as $ordering) {
         $this->parameters->addId($ordering->getIsAscendingId(), ParameterHasher::valueType());
     }
     return parent::visitOrderBy($segment);
 }
 public function visitRange(Segments\Range $segment)
 {
     $this->parameters->addId($segment->getStartId(), ParameterHasher::valueType());
     $this->parameters->addId($segment->getAmountId(), ParameterHasher::valueType());
     return parent::visitRange($segment);
 }
 public function testCollectionSuppliesCorrectParameterHasToExpressionParameter()
 {
     $this->collection->addExpression(O\Expression::value('val-test'), $hasher = ParameterHasher::valueType());
     $this->assertSame($hasher, $this->collection->getParameters()[0]->getHasher());
 }
 protected function addParameter(Parameters\ParameterCollection $parameters, IFunction $function, O\Expression $expression, Parameters\IParameterHasher $hasher = null)
 {
     $parameters->add(new StructuralExpressionParameter($expression, $hasher ?: Parameters\ParameterHasher::valueType(), $function));
 }