/** * Asserts that the aggregation result for the given aggregator matches the given result. * * @param mixed $expectedResultOfAggregation * @throws VisitorException */ private function assertAggregationResultImpl($expectedResultOfAggregation, Aggregator $a) { $this->assertSame($expectedResultOfAggregation, $a->accept($this->scalarPresentingVisitor)); }
public function accept(AggregatorVisitor $v) { return $this->if->isTrue() ? $this->then->accept($v) : $this->else->accept($v); }
public function visit(Aggregator $a) { return $a->accept($this->findPresenterOf($a)); }
/** * @param Aggregator $a * @throws UnableToCreateXml * @return DOMNode */ protected function getDOMNodeOf(Aggregator $a, DOMElement $destination) { $childXml = $destination->ownerDocument->createDocumentFragment(); $childXml->appendXML($a->accept($this->presenterOfEveryAggregator)); return $childXml; }